Because of unexpected long i18n strings the input fields end up with a tiny hight of about 5 px. Setting a min height on the input fields solves the problem for me.
Qt: add min size for input field in askpassphrase dialog #5226
pull jonasschnelli wants to merge 1 commits into bitcoin:master from jonasschnelli:askpassphrase-minheight changing 1 files +20 −2-
jonasschnelli commented at 2:32 PM on November 6, 2014: contributor
-
jonasschnelli commented at 2:34 PM on November 6, 2014: contributor
example of how the situation looks without this change (OSX 10.10 / qt5):

After this change:

-
laanwj commented at 10:12 AM on November 7, 2014: member
Instead of hardcoding 20 pixels it would be nice to get a suggested height for input widgets. Qt has various sizing settings (both on layout and widget level), are you sure it's not solvable with those alone?
-
2b36ab284a
Qt: add min size for input field in askpassphrase dialog
Because of unexpected long i18n strings the input fields end up with a tiny hight of about 5 px.
- jonasschnelli force-pushed on Nov 7, 2014
-
jonasschnelli commented at 9:31 PM on November 7, 2014: contributor
I tried different approaches but didn't succeed with setting constraints. Somehow the problem is that the QDialog should have a flexible height but as far as i see the QFormLayout does not stretch in height. And my QT knowhow is very limited.
Maybe this solution is not the best but better then the current state (unusable password entry dialog).
-
jonasschnelli commented at 8:29 AM on November 20, 2014: contributor
It would be great if someone could review/test this because i think it would be good t have this in 0.10. Currently entering wallet encryption passphrase in OSX looks really bad.
-
laanwj commented at 10:16 AM on November 20, 2014: member
@jonasschnelli well I can merge it if it is an improvement, but I don't like absolute pixel sizes at all; people will have different font sizes, especially for accessibility reasons. This reeks of "this fixes it in my specific setup so it should be OK". The window indeed behaves strangely (at least in Qt5). It's also resizable. Going to look into this.
-
laanwj commented at 10:29 AM on November 20, 2014: member
I isolated the root cause in
askpassphrasedialog.cpp:ui->warningLabel->setText(tr("Enter the new passphrase to the wallet.<br/>Please use a passphrase of <b>ten or more random characters</b>, or <b>eight or more words</b>."));Commenting these out causes the window to behave normally. So maybe somehow Qt needs to be kicked after this to enforce sizing constraints again.
Hm. The problem is that the QLabel grows in size, and the rest of the layout doesn't cope with that in the correct way.
- laanwj referenced this in commit e0a25c54eb on Nov 20, 2014
-
jonasschnelli commented at 12:31 PM on November 20, 2014: contributor
superseded by #5320, closing.
- jonasschnelli closed this on Nov 20, 2014
- reddink referenced this in commit fd351b9f5a on May 27, 2020
- DrahtBot locked this on Sep 8, 2021