diff --git a/Gui/TopBar.qml b/Gui/TopBar.qml index d118d22..bd3f1a9 100644 --- a/Gui/TopBar.qml +++ b/Gui/TopBar.qml @@ -2,6 +2,7 @@ import QtQuick import QtQuick.Controls import QtQuick.Layouts + ColumnLayout { id: topBar @@ -14,6 +15,10 @@ ColumnLayout } + ButtonGroup + { + id: buttonBar + } BarButton { @@ -25,7 +30,7 @@ ColumnLayout Layout.margins: 3 Layout.topMargin: Dimensions.s icon.source: "qrc:/images/dash.svg" - + ButtonGroup.group: buttonBar // background: Rectangle // { // id: dashiBackie @@ -42,6 +47,7 @@ ColumnLayout { appLoader.source = "Dashboard.qml" + // dashiBackie.border.width = 2 // kundiBackie.border.width = 1 // mitoBackie.border.width = 1 @@ -59,7 +65,7 @@ ColumnLayout implicitHeight: 90 Layout.margins: 3 icon.source: "qrc:/images/customer.svg" - + ButtonGroup.group: buttonBar // background: Rectangle // { // id: kundiBackie @@ -93,7 +99,7 @@ ColumnLayout implicitHeight: 90 Layout.margins: 3 icon.source: "qrc:/images/object.svg" - + ButtonGroup.group: buttonBar // background: Rectangle // { // id: objBackie @@ -128,7 +134,7 @@ ColumnLayout Layout.margins: 3 icon.source: "qrc:/images/employee.svg" - + ButtonGroup.group: buttonBar // background: Rectangle // { // id: mitoBackie @@ -161,7 +167,7 @@ ColumnLayout implicitHeight: 90 Layout.margins: 3 icon.source: "qrc:/images/offer.svg" - + ButtonGroup.group: buttonBar // background: Rectangle // { // id: offersBackie @@ -195,7 +201,7 @@ ColumnLayout implicitHeight: 90 Layout.margins: 3 icon.source: "qrc:/images/invoice.svg" - + ButtonGroup.group: buttonBar // background: Rectangle // { // id: invoBackie @@ -224,7 +230,7 @@ ColumnLayout implicitWidth: 90 implicitHeight: 90 - + checkable: false flat: true Layout.bottomMargin: Dimensions.s onClicked: mainMenu.open() diff --git a/TeroStyle/ComboBox.qml b/TeroStyle/ComboBox.qml index dcbe890..46e5189 100644 --- a/TeroStyle/ComboBox.qml +++ b/TeroStyle/ComboBox.qml @@ -7,7 +7,9 @@ T.ComboBox { id: control font: Typography.body - implicitHeight: implicitContentHeight + topInset + bottomInset + implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, + implicitContentHeight + topPadding + bottomPadding, + implicitIndicatorHeight + topPadding + bottomPadding) contentItem: T.TextField { @@ -17,7 +19,7 @@ T.ComboBox { enabled: control.editable font: Typography.body - implicitHeight: Typography.body.pixelSize + topPadding + bottomPadding + 2 + implicitHeight: Typography.body.pixelSize + topPadding + bottomPadding inputMethodHints: control.inputMethodHints padding: Dimensions.m readOnly: control.down @@ -25,7 +27,7 @@ T.ComboBox { text: control.editable ? control.editText : control.displayText validator: control.validator width: control.width - indicator.width - verticalAlignment: TextInput.AlignVCenter + verticalAlignment: Text.AlignVCenter } background: Rectangle { border.color: Colors.interactive @@ -35,22 +37,34 @@ T.ComboBox { radius: Dimensions.radius width: parent.width } - delegate: MenuItem { - id: menuItem + // delegate: MenuItem { + // id: menuItem - required property int index + // required property int index + // required property var model + + // highlighted: control.highlightedIndex === index + // hoverEnabled: control.hoverEnabled + // text: model[control.textRole] + // width: control.width + + // background: Rectangle { + // color: menuItem.down || menuItem.highlighted ? Colors.primary : "transparent" + // height: menuItem.height + // width: menuItem.width + // } + // } + delegate: ItemDelegate { required property var model + required property int index + width: ListView.view.width + text: model[control.textRole] + // palette.text: control.palette.text + // palette.highlightedText: control.palette.highlightedText + // font.weight: control.currentIndex === index ? Font.DemiBold : Font.Normal highlighted: control.highlightedIndex === index hoverEnabled: control.hoverEnabled - text: model[control.textRole] - width: control.width - - background: Rectangle { - color: menuItem.down || menuItem.highlighted ? Colors.primary : "transparent" - height: menuItem.height - width: menuItem.width - } } indicator: Rectangle { id: indicator @@ -113,9 +127,6 @@ T.ComboBox { } Component.onCompleted: { - console.log(test.height) - console.log(control.height) - console.log(test.font.pointSize) - console.log(test.font.pixelSize) + console.log(control.implicitContentHeight) } } diff --git a/images/contract.svg b/images/contract.svg index 2c0c4c9..2374fa9 100644 --- a/images/contract.svg +++ b/images/contract.svg @@ -1,3 +1,3 @@ - diff --git a/images/customer.svg b/images/customer.svg index 633cbc8..936b2a1 100644 --- a/images/customer.svg +++ b/images/customer.svg @@ -1,3 +1,3 @@ - diff --git a/images/dash.svg b/images/dash.svg index 479346d..3a68105 100644 --- a/images/dash.svg +++ b/images/dash.svg @@ -1,3 +1,3 @@ - diff --git a/images/employee.svg b/images/employee.svg index 10602da..0c68d1f 100644 --- a/images/employee.svg +++ b/images/employee.svg @@ -1,3 +1,3 @@ - diff --git a/images/invoice.svg b/images/invoice.svg index 4209cf0..5abe598 100644 --- a/images/invoice.svg +++ b/images/invoice.svg @@ -1,3 +1,3 @@ - diff --git a/images/object.svg b/images/object.svg index 30fda33..8e303dd 100644 --- a/images/object.svg +++ b/images/object.svg @@ -1,3 +1,3 @@ - diff --git a/images/offer.svg b/images/offer.svg index 2913fab..3cef447 100644 --- a/images/offer.svg +++ b/images/offer.svg @@ -1,3 +1,3 @@ -