martinrotter / rssguard

Feed reader (and podcast player) which supports RSS/ATOM/JSON and many web-based feed services.
GNU General Public License v3.0
1.56k stars 124 forks source link

[FR]: Lock position of article previewer window (verticle layout) #766

Open RetroAbstract opened 2 years ago

RetroAbstract commented 2 years ago

Brief description of the feature request

This feature would allow the user to lock the position of the article previewer window.

Reason: The positioning of the article previewer gets automatically adjusted when moving RSS Guard from one monitor to another with a different resolution, resulting in having to always re-adjust it's positioning.

Would be located in: Right click in article previewer window > Lock window position.

martinrotter commented 2 years ago

You mean position of the "separator" between article previewer and article list? Can you perhaps make a video of the problem?

akinokonomi commented 2 years ago

You mean position of the "separator" between article previewer and article list?

@martinrotter, That's how I understand it too.

Here:

article previewer gets automatically adjusted when moving RSS Guard from one monitor to another with a different resolution

Most likely cause is that RSS Guard sets article previewer size in pixels, not proportional to the total window size (e.g. in percents).

If you can confirm it then that where the problem is.

I can't test it myself unfortunately, so it's just a speculation.

Would be located in: Right click in article previewer window > Lock window position.

I don't think it needs to have a separate option, it should work properly by default.

That is, unless I misunderstand something, and this is a duplicate of https://github.com/martinrotter/rssguard/issues/424, about persistent article previewer.

martinrotter commented 2 years ago
  1. Yes, value for "splitter" between article list and article viewer is set in pixels.
  2. I do not really do anything manual when window is moved between screens, all recalculations are done in upstream Qt libraries.

FOR ME: https://lists.qt-project.org/pipermail/interest/2016-October/024823.html

akinokonomi commented 2 years ago

all recalculations are done in upstream Qt libraries.

@martinrotter Indeed, it can be the upstream issue, and its integration of QtWebengine into UI. Qt6 supposed to have fixed their UI issues with screen scaling since Qt5, though. (No idea about Webengine.)

So you are saying pixels is the only way to keep coordinates of the article browser splitter? Does the feed list has it the same?

To clarify it for me, you just keep the position of splitter, not the size of the article viewer?


previewer gets automatically adjusted when moving RSS Guard from one monitor to another with a different resolution

@RetroAbstract, Do you experience it with nowebengine version of RSS Guard too? Could you test it please.

Also, just to confirm, do you have different scaling on those screens? And, you are on Windows, right?

martinrotter commented 2 years ago

To clarify it for me, you just keep the position of splitter, not the size of the article viewer?

It is not straightforward. I remember "list of sizes" separated by the splitter/separator.

So I in fact remember heights (or widths) of those GUI components separated and those are in pixels. All recalculations of ratios etc. when transferring window to another screen are somehow done automatically.

Another thing is that I do not really have any chance to test some fix.

I have one fix on mind (but again no way to test):

  1. Detect when windows gets moved from screen to screen.
  2. Let's say that old values of splitter are 400/300 (heights of article list and article previewer).
  3. Get total height of available space on new screen and move splitter to 400/x position.

https://doc.qt.io/qt-6/qsplitter.html#sizes

akinokonomi commented 2 years ago

All recalculations of ratios etc. when transferring window to another screen are somehow done automatically.

Also notice that OP's having problems only with article viewer and not with feed list.

RetroAbstract commented 2 years ago

You mean position of the "separator" between article previewer and article list? Can you perhaps make a video of the problem?

Yes the separator position, which determines the width of the article previewer window. I will have to note when the problem that originally made me submit this FR happens exactly & update this issue with more info.

@RetroAbstract, Do you experience it with nowebengine version of RSS Guard too? Could you test it please.

I use the nowebengine version by default.

Also, just to confirm, do you have different scaling on those screens? And, you are on Windows, right?

Yes I have different scaling percentages & resolutions on the 2 monitors, and yes I'm on Windows.

martinrotter commented 2 years ago

@RetroAbstract Can you re-test this with latest Qt6-based 4,.2.4 build?

RetroAbstract commented 2 years ago

@RetroAbstract Can you re-test this with latest Qt6-based 4,.2.4 build?

Tested with 4.2.4, the position of of the article previewer window remains the same when manually moving RSS Guard from one monitor to the other.

Will report back if the window position changes again without my input.

martinrotter commented 2 years ago

So the problem is now de-facto solved?

RetroAbstract commented 2 years ago

So the problem is now de-facto solved?

I have noticed the issue does not happen when manually moving RSS Guard from one monitor to the other, but rather when RSS Guard is launched after being closed for a while / when monitors are turned on again after being off for a while - then RSS Guard seems to forget what the previously set position of the article previewer was.

Note that it doesn't happen every time.

xfzv commented 2 years ago

but rather when RSS Guard is launched after being closed for a while

That's what I'm experiencing too, even with 4.2.4. The preview pane is completely shrunk and I have to manually resize it every time. Occurs with both vertical and horizontal view.

xfzv commented 1 year ago

What's the status of this? just curious.

RetroAbstract commented 1 year ago

What's the status of this? just curious.

Same as when I opened this issue

andrewpros commented 1 year ago

Well i planned to report this as a BUG as even on single screen the vertical article pane separator gets reset now and there, but im not sure its is still an issue with the newest version, need to check.

xfzv commented 1 year ago

Well i planned to report this as a BUG as even on single screen the vertical article pane separator gets reset now and there, but im not sure its is still an issue with the newest version, need to check.

Still occurs here with a build I compiled today (c51b6089-nowebengine)

martinrotter commented 1 year ago

it would be really nice to have exact! steps to reproduce the problem as i was unable to reproduce really in the past

andrewpros commented 1 year ago

Well i verified it and it is still the case with win 4.2.5 828697bd-nowebengine.

For me, i just need to exit, either by closing Windows or just closing the app by Quit option, its not every time so i dont know the trigger factor, but it happens after a max of couple of tries. After win restart its almost always.

RetroAbstract commented 1 year ago

Well i verified it and it is still the case with win 4.2.5 828697b-nowebengine.

For me, i just need to exit, either by closing Windows or just closing the app by Quit option, its not every time so i dont know the trigger factor, but it happens after a max of couple of tries. After win restart its almost always.

Same experience as Andrew. Difficult to reproduce at will as even when Windows is restarted it might not happen.

andrewpros commented 1 year ago

Just close the app from the tray, it will very quickly reset.

Splitter name is m_messageSplitter Saved only when changing app window size or moving the splitter In my case, it resets splitter_messages_horizontal config.ini value to 100, 0

It happens after the app is loaded so its not saving it with wrong value, i dont even need to click any feed, just restart, app window shows, boom, splitter_messages_horizontal is reset, u dont even see the splitter yet

If i had to guess, thats why, u dont see it so it "does not exists" but the save event is triggered for some reason which is a common issue with resize events, but if it does not exists it puts a default size there...

RetroAbstract commented 1 year ago

Just close the app from the tray, it will very quickly reset.

Splitter name is m_messageSplitter Saved only when changing app window size or moving the splitter In my case, it resets splitter_messages_horizontal config.ini value to 100, 0

It happens after the app is loaded so its not saving it with wrong value, i dont even need to click any feed, just restart, app window shows, boom, splitter_messages_horizontal is reset, u dont even see the splitter yet

If i had to guess, thats why, u dont see it so it "does not exists" but the save event is triggered for some reason which is a common issue with resize events, but if it does not exists it puts a default size there...

Indeed.

Closing & restarting RSS Guard from tray icon resets the article previewer window position but in the following pattern:

  1. User-set position
  2. Reset/Close from tray
  3. User-set position untouched
  4. Reset/Close from tray again (second time)
  5. User-set position changed back to default.
andrewpros commented 1 year ago

Yeah, but that was before i checked some things, now seems tray or not, it does not matter, as it resets when the app window shows, not when exiting. Funny thing is, it can also happen by using the app for longer time, just showing/hiding the window multiple times in a day, and on top of that, its possible u will not even see it in the UI until u restart, but it will save immediately and it wont save the proper size when u exit as this value is only saved then u resize. So it seems this is only one way issue, when the window shows and there is some kind of initialization that resets the size.

xfzv commented 1 year ago

I noticed that a system reboot is very likely to trigger the issue (I'm using Linux). I'm not using the tray icon.

andrewpros commented 1 year ago

The thing is, it could be not the reboot, its what happened already when u run the app that day, and if it is what i suspect, the resize event, its qt based and system independent issue, normally u put some safe checks when it is needed for situations like this.

ghost commented 1 year ago

Using 4.3.1 nowebengine in Windows and the "bug" persists. Splitter gets down when I click on an article (the first you click, obviously, when you get opened RSS guard).

image

It's happening the exact same behaviour in kubuntu 22.10 which is 4.0.x I think, and it comes with the webengine by default.

andrewpros commented 1 year ago

It will persist as i dont think it was fixed.