From 13a199e6e2c5f27b0f12eff380df4f0c0d156e6e Mon Sep 17 00:00:00 2001 From: Mitch Curtis Date: Wed, 7 Sep 2016 12:27:13 +0200 Subject: Fix broken layout that results from making key visible after startup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- src/virtualkeyboard/content/components/BaseKey.qml | 7 +++++++ 1 file changed, 7 insertions(+) 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 -- cgit v1.2.3