Skip to content
Snippets Groups Projects
Commit cd80a272 authored by Kali Kaneko's avatar Kali Kaneko
Browse files

fix drawer

parent b8d7f667
Branches master
Tags 0.20.4
No related merge requests found
...@@ -49,7 +49,7 @@ T.Button { ...@@ -49,7 +49,7 @@ T.Button {
radius: 4 radius: 4
border.color: "black" border.color: "black"
border.width: 1 border.width: 2
color: !control.enabled ? control.Material.buttonDisabledColor : control.highlighted ? control.Material.highlightedButtonColor : Theme.buttonColor color: !control.enabled ? control.Material.buttonDisabledColor : control.highlighted ? control.Material.highlightedButtonColor : Theme.buttonColor
PaddedRectangle { PaddedRectangle {
...@@ -67,10 +67,13 @@ T.Button { ...@@ -67,10 +67,13 @@ T.Button {
// The layer is disabled when the button color is transparent so you can do // 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 // Material.background: "transparent" and get a proper flat button without needing
// to set Material.elevation as well // 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 { layer.effect: ElevationEffect {
elevation: control.Material.elevation elevation: control.Material.elevation
} }
*/
Ripple { Ripple {
clipRadius: 2 clipRadius: 2
......
...@@ -7,8 +7,14 @@ import QtQuick.Window 2.0 ...@@ -7,8 +7,14 @@ import QtQuick.Window 2.0
Rectangle { Rectangle {
id: panel id: panel
function show() { open = true; } function show() {
function hide() { open = false; } open = true;
drawerOn = true;
}
function hide() {
open = false;
drawerOn = false;
}
function toggle() { function toggle() {
open = open ? false : true; open = open ? false : true;
drawerOn = open; drawerOn = open;
...@@ -93,6 +99,7 @@ Rectangle { ...@@ -93,6 +99,7 @@ Rectangle {
function handleClick(mouse) { function handleClick(mouse) {
if ((_rightEdge && mouse.x < panel.x ) || mouse.x > panel.width) { if ((_rightEdge && mouse.x < panel.x ) || mouse.x > panel.width) {
open = false; open = false;
drawerOn = false;
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment