Bug 426760 - GlobalDrawer fails to appear when resized from a narrow width if hidden
Summary: GlobalDrawer fails to appear when resized from a narrow width if hidden
Status: RESOLVED NOT A BUG
Alias: None
Product: frameworks-kirigami
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.74.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: Not decided
Assignee: Marco Martin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-09-20 05:07 UTC by Bharadwaj Raju
Modified: 2020-09-25 12:02 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Screen recording showing the problem (181.14 KB, video/webm)
2020-09-20 05:07 UTC, Bharadwaj Raju
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bharadwaj Raju 2020-09-20 05:07:14 UTC
Created attachment 131794 [details]
Screen recording showing the problem

SUMMARY
When GlobalDrawer is used, and the window is resized to a narrow width and the drawer is hidden, subsequent resizing to a wide width will cause it to disappear entirely.

A screen recording which explains this better is attached.


STEPS TO REPRODUCE
1. Use GlobalDrawer, with the modal and handleVisible properties both set to !root.widescreen (code attached)
2. Resize the window to a narrow width, such that the drawer hide button appears
3. Hide the drawer so it collapses into the button
4. Resize the window back to a wide width

OBSERVED RESULT
The drawer disappears entirely. The only way of getting it back is to resize to a narrow width again.

EXPECTED RESULT
The drawer restores to its full size.

SOFTWARE/OS VERSIONS
KDE Plasma Version: 5.19.5
KDE Frameworks Version: 5.74.0 (package kirigami2-5.74.0-1-x86_64)
Qt Version: 5.15.1

MINIMAL CODE EXAMPLE

import QtQuick.Layouts 1.1
import org.kde.kirigami 2.0 as Kirigami

Kirigami.ApplicationWindow {
    id: root
    visible: true
    width: 800
    height: 500

    globalDrawer: Kirigami.GlobalDrawer {
        id: drawer

        modal: !root.wideScreen
        handleVisible: !root.wideScreen

        header: Kirigami.Heading {
            level: 1
            text: "Header"
            Layout.fillWidth: true
        }
    }
}
Comment 1 Bharadwaj Raju 2020-09-25 12:02:01 UTC
Turns out this is expected behaviour. Applications should use 	onWideScreenChanged: { if (wideScreen) { drawer.open() } }

tested, works. closing.