Remove offset on username field in classic theme#5788
Remove offset on username field in classic theme#5788droidmonkey merged 1 commit intorelease/2.6.3from
Conversation
|
Scrap all that. I found a much cleaner solution that doesn't need any style sheets in widgets where they don't belong: diff --git a/src/gui/styles/base/BaseStyle.cpp b/src/gui/styles/base/BaseStyle.cpp
index 6cde175c..db2897ab 100644
--- a/src/gui/styles/base/BaseStyle.cpp
+++ b/src/gui/styles/base/BaseStyle.cpp
@@ -4777,7 +4777,11 @@ QRect BaseStyle::subElementRect(SubElement sr, const QStyleOption* opt, const QW
}
case SE_LineEditContents: {
QRect r = QCommonStyle::subElementRect(sr, opt, w);
- int pad = Phantom::dpiScaled(Phantom::LineEdit_ContentsHPad);
+ int pad = Phantom::LineEdit_ContentsHPad;
+ if (w && qobject_cast<const QComboBox*>(w->parentWidget())) {
+ pad += 3;
+ }
+ pad = Phantom::dpiScaled(pad);
return r.adjusted(pad, 0, -pad, 0);
}
default:@randrew Not sure if that applies to your plain PhantomStyle as well, but you may want to have a look. |
|
I pushed it as a new commit, feel free to fix it up with the removal of the style sheets. |
581add3 to
a9f3e49
Compare
|
@phoerious Is there some particular setup I need to reproduce this in a test GUI? I don't see it with a standard line edit. |
|
@randrew this is comparing a QLineEdit with a QComboBox (which has a QLineEdit embedded in it). Unfortunately QComboBox doesn't let you style the internal QLineEdit and the left-padding is different between the two. |
|
Oh, this is something I never tried in the PhantomStyle funhouse. Thanks for pointing it out. I'll add it to to the funhouse and probably end up adding a similar fix for PhantomStyle itself. |
* Fix #5601 Fix padding offset in editable QComboBox Accepted
a9f3e49 to
2c2a8fd
Compare
|
I implemented your change @phoerious and also added 2 px stylesheet padding to QLineEdit's. Classic mode looks good now! |
|
I'll have to test if the 2px work well on Linux, too. What I certainly do notice on Windows at least is that the QComboBox has a different height. But that is not something that was touched here. |
Added - Support Argon2id KDF [#5778] - Support XMLv2 key files [#5798] Changed - Improve CSV Import/Export, include time fields and TOTP [#5346] - Support empty area dragging of the application window [#5860] - Display default Auto-Type sequence in preview pane [#5654] - Remove strict length limit on generated passwords [#5748] - Hide key file path by default when unlocking database [#5779] - Document browser extension use with Edge in managed mode [#5692] - Windows: Prevent clipboard history and cloud sync [#5853] - macOS: Update the application icon to Big Sur styling [#5851] Fixed - Re-select previously selected entry on database unlock [#5559] - Properly save special character choice in password generator [#5610] - Fix crash in browser integration with multiple similar entries [#5653] - Remove offset on username field in classic theme [#5788] - Ensure entry history is copied when drag/dropping entries and groups [#5817] - Close modal dialogs when database is locked [#5820] - Prevent crash when KeeShare modifies an entry that is currently being edited [#5827] - Improve preview of entry attributes [#5834] - Always activate/focus database open dialog preventing mistype [#5878] - Reports: fix calculation of average password length [#5862] - Linux: Delay startup on login to correct tray icon issues [#5724]
Release 2.6.3 Added - Support Argon2id KDF [keepassxreboot#5778] - Support XMLv2 key files [keepassxreboot#5798] Changed - Improve CSV Import/Export, include time fields and TOTP [keepassxreboot#5346] - Support empty area dragging of the application window [keepassxreboot#5860] - Display default Auto-Type sequence in preview pane [keepassxreboot#5654] - Remove strict length limit on generated passwords [keepassxreboot#5748] - Hide key file path by default when unlocking database [keepassxreboot#5779] - Document browser extension use with Edge in managed mode [keepassxreboot#5692] - Windows: Prevent clipboard history and cloud sync [keepassxreboot#5853] - macOS: Update the application icon to Big Sur styling [keepassxreboot#5851] Fixed - Re-select previously selected entry on database unlock [keepassxreboot#5559] - Properly save special character choice in password generator [keepassxreboot#5610] - Fix crash in browser integration with multiple similar entries [keepassxreboot#5653] - Remove offset on username field in classic theme [keepassxreboot#5788] - Ensure entry history is copied when drag/dropping entries and groups [keepassxreboot#5817] - Close modal dialogs when database is locked [keepassxreboot#5820] - Prevent crash when KeeShare modifies an entry that is currently being edited [keepassxreboot#5827] - Improve preview of entry attributes [keepassxreboot#5834] - Always activate/focus database open dialog preventing mistype [keepassxreboot#5878] - Reports: fix calculation of average password length [keepassxreboot#5862] - Linux: Delay startup on login to correct tray icon issues [keepassxreboot#5724]
Screenshots
Classic Theme:

Testing strategy
Tested on Windows
Type of change