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 { ...@@ -11,6 +11,10 @@ RowLayout {
property alias titleDateButton: titleDataButton property alias titleDateButton: titleDataButton
spacing: 0 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 { QQC2.ToolButton {
visible: !Kirigami.Settings.isMobile visible: !Kirigami.Settings.isMobile
icon.name: sidebar.collapsed ? "sidebar-expand" : "sidebar-collapse" icon.name: sidebar.collapsed ? "sidebar-expand" : "sidebar-collapse"
......
...@@ -983,9 +983,14 @@ Kirigami.ApplicationWindow { ...@@ -983,9 +983,14 @@ Kirigami.ApplicationWindow {
visible: !Kirigami.Settings.isMobile visible: !Kirigami.Settings.isMobile
icon.name: sidebar.collapsed ? "sidebar-expand" : "sidebar-collapse" icon.name: sidebar.collapsed ? "sidebar-expand" : "sidebar-collapse"
onClicked: { onClicked: {
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.forceCollapsedSidebar = !Config.forceCollapsedSidebar;
Config.save() Config.save()
} }
}
QQC2.ToolTip.text: sidebar.collapsed ? i18n("Expand Sidebar") : i18n("Collapse Sidebar") QQC2.ToolTip.text: sidebar.collapsed ? i18n("Expand Sidebar") : i18n("Collapse Sidebar")
QQC2.ToolTip.visible: hovered QQC2.ToolTip.visible: hovered
......
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