Bug 398820 - SimpleKCM: flickable.contentHeight evaluates to 0, causing KCMs using this template to have windows that are too small when opened in kcmshell
Summary: SimpleKCM: flickable.contentHeight evaluates to 0, causing KCMs using this te...
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kdeclarative
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Marco Martin
URL:
Keywords:
: 398801 398802 399767 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-09-18 20:55 UTC by Nate Graham
Modified: 2019-04-18 15:35 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.58


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nate Graham 2018-09-18 20:55:12 UTC
When you use kcmshell5 to open a KCM with a QML UI, the resulting window is excessively short, and doesn't show hardly any of the content. This appears to be because embedding a QML view does not result in a sizeHint value being correctly passed on. See the duplicates for visual examples and a list of affected KCMs, which can be expected to grow over time as more KCMs are ported.

At the moment this seems like an issue in frameworks-kcmutils, but if (ugh) it turns out to be a problem with all of those individual KCMs, we can always un-dupe them and track the fixes separately.
Comment 1 Nate Graham 2018-09-18 20:59:11 UTC
*** Bug 398794 has been marked as a duplicate of this bug. ***
Comment 2 Nate Graham 2018-09-18 20:59:15 UTC
*** Bug 398801 has been marked as a duplicate of this bug. ***
Comment 3 Nate Graham 2018-09-18 20:59:40 UTC
*** Bug 398802 has been marked as a duplicate of this bug. ***
Comment 4 Nate Graham 2018-09-18 20:59:52 UTC
*** Bug 398796 has been marked as a duplicate of this bug. ***
Comment 5 Nate Graham 2018-10-13 19:37:17 UTC
*** Bug 399767 has been marked as a duplicate of this bug. ***
Comment 6 Christoph Feck 2018-11-20 12:41:59 UTC
*** Bug 401163 has been marked as a duplicate of this bug. ***
Comment 7 Patrick Silva 2018-12-03 09:53:07 UTC
*** Bug 401583 has been marked as a duplicate of this bug. ***
Comment 8 Patrick Silva 2019-03-02 12:55:17 UTC
This bug persists. :(

Operating System: Arch Linux 
KDE Plasma Version: 5.15.2
KDE Frameworks Version: 5.55.0
Qt Version: 5.12.1
Comment 9 tigrangab+kdebugs 2019-03-20 23:47:49 UTC
I changed:

    width: units.gridUnit * 25
    height: !!currentBattery ? units.gridUnit * 25 : units.gridUnit * 12

from energyinfo module's main.qml in kinfocenter to:

    implicitWidth: units.gridUnit * 25
    implicitHeight: !!currentBattery ? units.gridUnit * 25 : units.gridUnit * 12

and the window now adjusts to the size provided.
Same behavior observed with file index manager.

I don't know the significance of that as I'm new to kde/qt, just reporting what I observed so far.
Comment 10 Nate Graham 2019-03-24 18:16:28 UTC
That's a very nice find, and sounds like the correct fix to me. Would you like to submit some patches for these? I can help if anything on https://community.kde.org/Get_Involved/development or https://community.kde.org/Infrastructure/Phabricator
Comment 11 tigrangab+kdebugs 2019-03-24 20:16:14 UTC
Sure, I can work on it.
Comment 12 Aleix Pol 2019-03-25 11:16:32 UTC
Git commit 43bfb812df95ddddb3e33107e2ba5fc9e1680332 by Aleix Pol, on behalf of Tigran Gabrielyan.
Committed on 25/03/2019 at 11:14.
Pushed by apol into branch 'master'.

Fix initial width/height in KCMs that use qml

Summary:
This change fixes width/height for File Index Manager and Energy Information modules.

Reviewers: apol

Reviewed By: apol

Subscribers: ngraham, apol, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D20027

M  +2    -2    Modules/energy/package/contents/ui/main.qml
M  +3    -0    Modules/fileindexermonitor/package/contents/ui/main.qml

https://commits.kde.org/kinfocenter/43bfb812df95ddddb3e33107e2ba5fc9e1680332
Comment 13 Patrick Silva 2019-04-04 20:48:14 UTC
This bug persists.

Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.15.80
KDE Frameworks Version: 5.57.0
Qt Version: 5.12.0
Comment 14 Nate Graham 2019-04-05 15:04:03 UTC
For which KCMs?
Comment 15 Patrick Silva 2019-04-05 16:21:33 UTC
fonts
workspace
launch feedback
mouse (libinput)
touchpad (libinput)
Comment 16 Nate Graham 2019-04-05 20:56:14 UTC
Found the generic problem in https://cgit.kde.org/kdeclarative.git/tree/src/qmlcontrols/kcmcontrols/qml/SimpleKCM.qml#n51

flickable.contentHeight is always 0 for some reason.

Some individual KCMs may need their own fixes beyond that but this is the root cause of the problems with our KCMs that use the SimpleKCM template.
Comment 17 Nate Graham 2019-04-05 21:13:54 UTC
Partial patch: https://phabricator.kde.org/D20283
Comment 19 Nate Graham 2019-04-18 14:53:58 UTC
*** Bug 398802 has been marked as a duplicate of this bug. ***
Comment 20 Nate Graham 2019-04-18 14:54:00 UTC
*** Bug 399767 has been marked as a duplicate of this bug. ***
Comment 21 Nate Graham 2019-04-18 14:54:03 UTC
*** Bug 398801 has been marked as a duplicate of this bug. ***
Comment 22 Nate Graham 2019-04-18 14:54:05 UTC
*** Bug 398794 has been marked as a duplicate of this bug. ***
Comment 23 Nate Graham 2019-04-18 14:54:08 UTC
*** Bug 398796 has been marked as a duplicate of this bug. ***