use a TextMetrics for height
AbandonedPublic

Authored by mart on Mar 7 2019, 3:08 PM.

Details

Reviewers
None
Group Reviewers
Plasma
Summary

as contentHeight could change when switching to password mode,
use a textmetrics which always computes it from the visible text

BUG:399155

Diff Detail

Repository
R858 Qt Quick Controls 2: Desktop Style
Branch
phab/height
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 9288
Build 9306: arc lint + arc unit
mart created this revision.Mar 7 2019, 3:08 PM
Restricted Application added a project: Plasma. · View Herald TranscriptMar 7 2019, 3:08 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
mart requested review of this revision.Mar 7 2019, 3:08 PM
ngraham added a subscriber: ngraham.Mar 7 2019, 3:18 PM

Hmm, this does not actually fix the problem for me in Neon with all default font settings. The password field still gets taller when the first character of the password is typed.

sitter added a subscriber: sitter.Mar 7 2019, 4:44 PM

I think this is the wrong TextField for SDDM/kscreenlocker actually. They use PlasmaComponents 2, which judging by my printf debugging isn't loading that particular TextField.qml.

TextFieldStyle.qml seems to be what's loaded there, however when applying the change there it doesn't fix the problem :/
In fact, setting implicitHeight seems largely useless. When I manually add +30, the field is larger but upon entering anything it still resizes by one pixel.

BTW for testing you can simply qmlscene Main.qml in plasma-workspace/sddm-theme. Also on !neon you'll want P340 for your ~/.config/fontconfig/fonts.conf to make sure font order is as it should be for noto. Oh, also I think the symbols2 split only happened like a year or two ago, so particularly old systems will also need newer noto TTFs.

mart abandoned this revision.Mar 7 2019, 5:29 PM