From f384b3201fb90c4a49291fff95fa13683e0d06aac3790a966974004aefc92259 Mon Sep 17 00:00:00 2001 From: linuxero Date: Mon, 4 Nov 2024 20:05:58 +0100 Subject: [PATCH] Buttons on the top bar --- gui/TopBar.qml | 78 +++++++++++++++++--------------------------------- 1 file changed, 26 insertions(+), 52 deletions(-) diff --git a/gui/TopBar.qml b/gui/TopBar.qml index 0d6e319..6960fb4 100644 --- a/gui/TopBar.qml +++ b/gui/TopBar.qml @@ -18,7 +18,7 @@ import QtQuick.Controls.Material RowLayout { id: topBar - + spacing: 0 height: 35 width: parent.width @@ -33,20 +33,15 @@ import QtQuick.Controls.Material Button { id: dashBoard - // implicitWidth: 65 - // implicitHeight: 25 - // background: Rectangle - // { - // border.color: "#f6f6f6" - // border.width: 1 - // radius: 4 - // } implicitWidth: 85 hoverEnabled: true + highlighted: true + flat: true background: Rectangle { - color: Material.primary - radius: 8 + color: dashBoard.down? Material.accent: Material.primary + border.color: dashBoard.hovered? "lightgrey": "transparent" + radius: 0 } Text @@ -55,23 +50,19 @@ import QtQuick.Controls.Material anchors.centerIn: parent } } + Button { id: kunden - // implicitWidth: 65 - // implicitHeight: 25 - // background: Rectangle - // { - // border.color: "#f6f6f6" - // border.width: 1 - // radius: 4 - // } implicitWidth: 85 hoverEnabled: true + highlighted: true + flat: true background: Rectangle { - color: Material.primary - radius: 8 + color: kunden.down? Material.accent: Material.primary + border.color: kunden.hovered? "lightgrey": "transparent" + radius: 0 } Text @@ -83,20 +74,15 @@ import QtQuick.Controls.Material Button { id: objekt - // implicitWidth: 65 - // implicitHeight: 25 - // background: Rectangle - // { - // border.color: "#f6f6f6" - // border.width: 1 - // radius: 4 - // } implicitWidth: 85 hoverEnabled: true + highlighted: true + flat: true background: Rectangle { - color: Material.primary - radius: 8 + color: objekt.down? Material.accent: Material.primary + border.color: objekt.hovered? "lightgrey": "transparent" + radius: 0 } Text @@ -108,20 +94,15 @@ import QtQuick.Controls.Material Button { id: mitarbeiter - // implicitWidth: 65 - // implicitHeight: 25 - // background: Rectangle - // { - // border.color: "#f6f6f6" - // border.width: 1 - // radius: 4 - // } implicitWidth: 85 hoverEnabled: true + highlighted: true + flat: true background: Rectangle { - color: Material.primary - radius: 8 + color: mitarbeiter.down? Material.accent: Material.primary + border.color: mitarbeiter.hovered? "lightgrey": "transparent" + radius: 0 } Text @@ -130,24 +111,17 @@ import QtQuick.Controls.Material anchors.centerIn: parent } } + Button { id: abrechnung - // implicitWidth: 79 - // implicitHeight: 25 - // //color: button.down ? "#d6d6d6" : "#f6f6f6" - // background: Rectangle - // { - // border.color: "#f6f6f6" - // border.width: 1 - // radius: 4 - // } implicitWidth: 85 hoverEnabled: true background: Rectangle { - color: Material.primary - radius: 8 + color: abrechnung.down? Material.accent: Material.primary + border.color: abrechnung.hovered? "lightgrey": "transparent" + radius: 0 } Text