diff options
author | Mitch Curtis <mitch.curtis@qt.io> | 2016-09-07 12:27:13 +0200 |
---|---|---|
committer | Mitch Curtis <mitch.curtis@qt.io> | 2016-09-12 13:06:26 +0000 |
commit | 13a199e6e2c5f27b0f12eff380df4f0c0d156e6e (patch) | |
tree | 16ed372beae9de2b1b2a21b1d8dbee431e33793a | |
parent | 68c30e00b0d9850643611d5ba9c29a247ccd44ec (diff) |
Fix broken layout that results from making key visible after startup
The RowLayout that contained the key that was made visible seemed to
get an implicitHeight, where all the other rows had implicitHeights of
0. The RowLayouts fill the width and height of their parent (a
ColumnLayout), which means that the implicitHeight won't be used as
long as its small enough; it's just there to prevent rows from getting
large implicitHeights.
Task-number: QTBUG-54953
Change-Id: Ic7a8a6f00f03a4ea8a05abf69cfedcf168c919d7
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
-rw-r--r-- | src/virtualkeyboard/content/components/BaseKey.qml | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/virtualkeyboard/content/components/BaseKey.qml b/src/virtualkeyboard/content/components/BaseKey.qml index 8dd0da8f..df06c374 100644 --- a/src/virtualkeyboard/content/components/BaseKey.qml +++ b/src/virtualkeyboard/content/components/BaseKey.qml @@ -221,6 +221,13 @@ Item { onSoundEffectChanged: keyboard.soundEffect.register(soundEffect) + // QTBUG-54953, QTBUG-55773 + // Avoid a row that was hidden taking up the entire height of the + // keyboard when it is made visible after the application has started. + // This value is low because keys can scale vertically, and setting e.g. 40 + // pixels might be too high for a keyboard that doesn't have a lot of space. + implicitHeight: 1 + Layout.minimumWidth: keyPanel.implicitWidth Layout.minimumHeight: keyPanel.implicitHeight Layout.preferredWidth: weight |