-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
High DPI screen with non-high DPI resolution causes enlarged application #2815
Comments
Duplicate of #2808? |
I think it is different, but related to the DPI changes. We need DPI to be relevant to the display that the application's window is being displayed on. Or be able to turn on or off the special DPI settings as a preference if it can't be done automatically and dynamically when you move the window from screen to screen. |
I just upgraded to 2.4.0 from 2.3.4 ... GUI is basicly not useable. I have FHD screen. Everything was ok until this upgrade. UI is not huge but terribly small. Ubuntu 18.04. Dropdown menus open somewhere on the screen in correct size, but whole window has basically totally wrong DPI. Any ideas how to fix this? Thanks |
This screenshot shows the current situation |
Update: switching back to 2.3.4 did not help, GUI is still terribly small. But following is working with 2.3.4 and it fixes everything: but it does not work for 2.4.0. |
QT_AUTO_SCREEN_SCALE_FACTOR is a boolean 1 or 0 variable. @affinityv this is what you want to support different DPI per monitor. QT made this opt-in unfortunately, you have to setup your environment on Linux. |
Okay, thanks that helps. This link seems to help with more information: And these are the entries I added to my .profile: So, you are effectively telling QT to NOT scale automatically and you are setting the scaling for each screen as above. Then dragging the application window between monitors is good for both of my screens. That works nicely, thanks again. |
Great, glad that works |
Other info that might help others is here: |
This should totally work without the need for setting environment variables. Windows is smart enough for it, but apparently X fails us again and yet again. But I guess that just happens if you cling to 30-year old software and refuse to adopt something more modern that actually works. |
I have this same problem in Windows. I'm using different scaling values on the monitors which I assume is causing the issue. Setting the env variables helps. |
@droidmonkey Why did you close the issue? Is there a fix for it? |
I see that there were lots of duplicates to this issue: #434 #2808 #2815 #2981 IMO the issue is not solved. Prior to KeePassXC 2.4.0, the font size was ok and no change was needed. After 2.4.0 it seems like a environment variable needs to be set for having a normal font size. (Besides this, the problem does not only affect the AppImage. It also happens on my Ubuntu 18.04 using the official snap package. Unfortunately, even the workaround mentioned above does not help here...) |
This is not an issue with KeePassXC. This is a Qt issue. We added support for High DPI in 2.4.0, see my comment in the other thread: #2808 (comment) |
Am I wrong or does the High DPI support broke other systems? I see issues with Windows and Linux in all those threads. Seems this feature is only working correctly on Apple OS's. So the suggestion is that all affected people should adjust the Qt environment variables to fix something that wasn't an issue before High DPI support was activated? I'm not really into Qt development and I don't know what are the benefits of the High DPI support nor do I know how to fix it. But this solution feels bad, IMHO. |
@droidmonkey The point is that you changed something in 2.4.0 which breaks many systems now while it worked fine before. I think you can't blame Qt for this. |
@stucki, the change made was to enable Qt's support for hidpi. So yes, I can blame them. It was literally one line of code. It would already, and is documented, that Qt is not properly detecting a hidpi monitor / setup which necessitates the environment variables. We can just as easily disable support for hidpi and receive complaints from those users that want support for it. |
Whoever is to blame... Thing is, the workaround mentioned above didn't work for me while using the official snap package. Instead, I had to edit the file
Also notice that I had to set |
@droidmonkey No offence, but I don't understand that decision. I think if a feature of a framework isn't working correctly on all supported platforms it should not be activated or at least you/we should try to find a better solution/workaround instead of breaking the experience of other users. I get that most of the people here are experienced enough to set some environment variables but what about all the other users that don't come here to check for issues regarding a huge interface? I'm not sure if they even bother searching for a solution if they encounter the huge UI issue. |
We ran a 3 month beta period with the feature enabled and did not receive complaints. It's unfortunate but until you release to a wide audience some issues are not readily apparent. I am preparing a PR that will add a setting to disable HiDPI support so you dont have to setup the env vars. You must understand though that ANY Qt based application that enables HiDPI support will require you to setup your env vars. It is not unique to KeePassXC. Perhaps we are slightly unique in enabling the option in the first place. |
Thanks for sharing more details on that issue and for providing a really superb cross-platform password manager 😃 |
I didn't want to show all my logins so I used the settings page, so yes, I admit it's hard to tell how larger the text/icons are.
|
Seriously, PLEASE find a HiDPI display and test KeePassXC on it. You won't know the pain unless you experience it yourself.
On my 15.6' laptop with a 4K display, 250% is the most appropriate scaling factor. And KeePassXC's UI looks WAY TOO LARGE on it. |
I have a 4k display... 15.6" laptop.... Scaled to 175% |
Please try a 2.6 snapshot build. 2.5 will see no further updates and 2.6 has some font fixes. |
@database64128 welcome to KeePassXC! I am a lead developer along with @phoerious. I am well versed in how KeePassXC runs on ALL platforms. As for scaling... couple notes:
Using KeePassXC 2.6.0 with your comparison of the Task Manager results in the same font size (note our font is bolder): |
Tried
I'm aware that you and phoerious are the lead developers of this project. And I really do appreciate your hard work! 👍 That being said, I did and still do find some of your comments ignorant and arrogant, and a little offensive 😥, such as
These are mostly opinion-based and not constructive comments. Anyways, I have thought about this for a while. And I feel it doesn't really justify my downvotes. Downvoting opinions from the project maintainers is disrespectful and it really hurts feelings. Maintaining a project like this is not easy. So I'm taking back by downvotes. And I apologize for that. 🥺 Here's another comparison. |
True, I'm a tad salty but this is a fun topic. As for your experiment, the second image is very blurry (compared to the first). This is actually because your window is being rendered at 100% scale and Windows is "upscaling" it a bit so it looks "OK". In reality nothing is OK and the application is actually misbehaving. You can see this blurriness in eturk1 screenshot of the System scale compatibility override. Basically what you want is a scale factor of 200%. I encourage you to give it a try. |
Let's just ignore the blurriness and focus on the size of the UI elements. The UI elements in the 2nd picture are in their designed/expected size. In the first screenshot they are 1.2x of its expected size. That makes KeePassXC look out of line among other applications.
I already tried it a few times. It makes a lot of stuff too small on my 15.6' laptop display. 😅 |
Granted I do think 2.6.0 has a little too much padding in various areas, but the font size and face is literally the same as the windows desktop. If you have suggestions on where the UI can be nipped and tucked I'd like to hear em. |
Looking at the screenshots above, I want to point out that the original issue that was reported here is about a much different font size, and it still exists! Just look at this screenshot to see how my keepassxc looks right after being installed: What I need to do after every new release is to patch the
With this patch applied, the font size looks ok to me: |
That is actually a snap issue |
Thanks for clarifying! Should I create a PR for this change? |
No, what I meant was its an issue with snaps in general, not something we can fix per say. |
Hmm but the fix solves the problem, no? Does it have any negative implications for other users? If not then it should be added in keepassxc nevertheless. After all the issue here is that users who install keepassxc via snap will have a weird display size of keepassxc whereas other applications (even if installed via snap) work fine. I can solve the problem for myself using the patch above, but we should find a fix which works out of the box. Agree? |
The correct values for these environment variables depend on your monitor configuration. We cannot simply hard-code something we know will break some people's setup only to fix that of some others. |
Hmm ok. However, doesn't look as if this is going to be fixed soon. I did some research to see if the issue is reported anywhere else:
I still think that it may be useful to make the HiDPI feature configurable in the settings so that users have an easy way to fix this without having to edit files in |
This change should help all you who want a "smaller" application: #4910 |
Just realized what the problem actually is: Qt defaults to rounding the scale factor up for .5 and above on desktop. That's why on my 250% Display the UI is 1.2x the size it should be: As per https://doc.qt.io/qt-5/highdpi.html:
So the workaround would be to set the Without With |
Wow didn't know they introduced that option! Will add that to 2.6.0 |
Mind blown...
|
- Set `Qt::HighDpiScaleFactorRoundingPolicy::PassThrough` to fix large UI on devices with non-integer scaling factors - Fix #17007 - See discussions at keepassxreboot/keepassxc#2815 and my fix at keepassxreboot/keepassxc#4915
Expected Behavior
Easily readable text on FHD screen, not enlarged text on HiDPI screen
Current Behavior
HiDPI screen is readable and okay, but I normally move the database window to my FHD screen, now the FHD screen has tiny text and it is hard to read.
Possible Solution
Allow alternative display settings for screens with different DPI profiles/settings?
Allow turning off of HiDPI settings when database window is on non HiDPI screen (even if the other screen is HiDPI).
Automatically adjust HiDPI setting depending on the screen that the window is open on (or moved to) to suit.
Steps to Reproduce
Need two screens, one with very high resolution and the other with FHD or lower.
Open app, move displayed window between screens, see the differences, difficulty in using the lesser resolution screen.
Context
Can't easily use the FHD screen for my database now, it's too difficult to read.
Debug Info
KeePassXC - Version 2.4.0
Revision: c51752d
Distribution: AppImage
Libraries:
Operating system: Devuan GNU/Linux ascii
CPU architecture: x86_64
Kernel: linux 4.9.0-6-amd64
Enabled extensions:
The text was updated successfully, but these errors were encountered: