Commit 108b5963 authored by Claudio Cambra's avatar Claudio Cambra
Browse files

Fixed collapse button in narrow window mode in tasks view

parent 5a91e446
Pipeline #96454 canceled with stage
......@@ -11,6 +11,10 @@ RowLayout {
property alias titleDateButton: titleDataButton
spacing: 0
// REMINDER: The collapse button used in the tasks view has its own implementation!!
// You can find it in its instantiating component in main.qml
QQC2.ToolButton {
visible: !Kirigami.Settings.isMobile
icon.name: sidebar.collapsed ? "sidebar-expand" : "sidebar-collapse"
......
......@@ -983,8 +983,13 @@ Kirigami.ApplicationWindow {
visible: !Kirigami.Settings.isMobile
icon.name: sidebar.collapsed ? "sidebar-expand" : "sidebar-collapse"
onClicked: {
Config.forceCollapsedSidebar = !Config.forceCollapsedSidebar;
Config.save()
if(sidebar.collapsed && !wideScreen) { // Collapsed due to narrow window
// We don't want to write to config as when narrow the button will only open the modal drawer
sidebar.collapsed = !sidebar.collapsed;
} else {
Config.forceCollapsedSidebar = !Config.forceCollapsedSidebar;
Config.save()
}
}
QQC2.ToolTip.text: sidebar.collapsed ? i18n("Expand Sidebar") : i18n("Collapse Sidebar")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment