-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
The text on the buttons is cut off when requesting a save #10381
Comments
This is a bug with Qt on Linux. There is not much we can do to fix this problem |
The text in Windows is also cropped a bit around the edges of the buttons |
KPXC uses Qt on all OSes. Try adjusting the Qt scaling. |
@droidmonkey I've read up on this problem and as far as I understand it's not a bug. Need to resize the buttons. It's been looked at in more detail here |
This should be done by Qt, hence it is their bug. Sure we can do that ourselves (and we will, thank you for the share), but the UI framework should be handling overflow... |
@droidmonkey Additionally, you need to change the base style as the size of dialogs and buttons is set there |
That doesn't make sense, ugh, I hate Qt styling |
@droidmonkey without changing the base style, it doesn't work. Try building and see for yourself. This is also written about on stackoverflow, the link was above.
And See UPDATE 3 |
This is still a qt bug... |
@droidmonkey You also need to delete these three lines This is after removing these lines in the style settings, scales correctly. |
I will not remove those lines, we put that there for a reason, we want our dialogbox buttons to have a minimum width! Qt, however, treats that as license to squish the widget down to that minimum width without regard for the contents. That is a serious bug since there is no way to set a minimum width otherwise. Qt even considers this a feature, which is insane to me: I added an attempt to wipe out the min-width setting if the QDialogBox is within a QMessageBox widget, see here: https://github.com/keepassxreboot/keepassxc/pull/10500/files#diff-dc3ecb5ff0e9757970323ce929d8a40fcaef9b80421087bab00147186dbb4abd Can you test this PR for me? |
After the fixes you've made, they will be minimum length anyway, and so you're just trimming the content of buttons and dialogs in other languages, the scaling won't work. I've tested your PR and it doesn't work. That's why I'm writing about the minimum width restriction. |
minimum length != minimum width. The min-width setting guarantees a button will be (in this case) at least 55px wide. So even if the text is "OK" it will be 55px wide. The widget should always be big enough to hold the contents unless some sort of overflow style is set, that is how CSS works. Test it again if you haven't in the past day, I made a recent push. |
I saw your new PR that's exactly what I've been testing. I built it before I wrote it |
I have another idea, just pushed, try it again |
OK, I replicated this on macOS, agree that doesn't work (I think cause the dialog is a child of MainWindow). Either way, I removed the min-width setting and nothing seems to be different in the application so I'll just remove it. Sorry about that, I should have tested just removing it to see if there were any poor effects in the first place. |
The text is left-aligned to the icon. Will you be able to center it? |
Steps to Reproduce
KeePassXC - 2.7.7
Operating System: Windows/Linux
The text was updated successfully, but these errors were encountered: