From cd80a2728e3517c6f4229b87600f2c3a78f76f02 Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Thu, 9 Dec 2021 16:59:47 +0100 Subject: fix drawer --- gui/components/MaterialButton.qml | 7 +++++-- gui/components/NavigationDrawer.qml | 11 +++++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/gui/components/MaterialButton.qml b/gui/components/MaterialButton.qml index 8e90e94..ad1ca59 100644 --- a/gui/components/MaterialButton.qml +++ b/gui/components/MaterialButton.qml @@ -49,7 +49,7 @@ T.Button { radius: 4 border.color: "black" - border.width: 1 + border.width: 2 color: !control.enabled ? control.Material.buttonDisabledColor : control.highlighted ? control.Material.highlightedButtonColor : Theme.buttonColor PaddedRectangle { @@ -67,10 +67,13 @@ T.Button { // The layer is disabled when the button color is transparent so you can do // Material.background: "transparent" and get a proper flat button without needing // to set Material.elevation as well - layer.enabled: control.enabled && control.Material.buttonColor.a > 0 + layer.enabled: true // control.enabled && control.Material.buttonColor.a > 0 + + /* layer.effect: ElevationEffect { elevation: control.Material.elevation } + */ Ripple { clipRadius: 2 diff --git a/gui/components/NavigationDrawer.qml b/gui/components/NavigationDrawer.qml index c0e467c..8e7db8e 100644 --- a/gui/components/NavigationDrawer.qml +++ b/gui/components/NavigationDrawer.qml @@ -7,8 +7,14 @@ import QtQuick.Window 2.0 Rectangle { id: panel - function show() { open = true; } - function hide() { open = false; } + function show() { + open = true; + drawerOn = true; + } + function hide() { + open = false; + drawerOn = false; + } function toggle() { open = open ? false : true; drawerOn = open; @@ -93,6 +99,7 @@ Rectangle { function handleClick(mouse) { if ((_rightEdge && mouse.x < panel.x ) || mouse.x > panel.width) { open = false; + drawerOn = false; } } -- cgit v1.2.3