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
  1. jonasschnelli commented at 2:32 PM on November 6, 2014: contributor

    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.

  2. jonasschnelli commented at 2:34 PM on November 6, 2014: contributor

    example of how the situation looks without this change (OSX 10.10 / qt5):

    bildschirmfoto 2014-11-06 um 15 25 22

    After this change: bildschirmfoto 2014-11-06 um 15 34 38

  3. 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?

  4. 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.
    2b36ab284a
  5. jonasschnelli force-pushed on Nov 7, 2014
  6. 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).

  7. 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.

  8. 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.

  9. 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.

  10. laanwj referenced this in commit e0a25c54eb on Nov 20, 2014
  11. laanwj commented at 11:34 AM on November 20, 2014: member

    See #5320 for an attempt at a fix without hardcoding any values... it's still ugly, but I wasn't able to solve it just with changing policies.

  12. jonasschnelli commented at 12:31 PM on November 20, 2014: contributor

    superseded by #5320, closing.

  13. jonasschnelli closed this on Nov 20, 2014

  14. reddink referenced this in commit fd351b9f5a on May 27, 2020
  15. DrahtBot locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-13 18:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me