diff --git a/Gui/ObjectTable.qml b/Gui/ObjectTable.qml index e72e3a8..19c9865 100644 --- a/Gui/ObjectTable.qml +++ b/Gui/ObjectTable.qml @@ -5,13 +5,13 @@ import Qt.labs.qmlmodels Item { property var availableFilters: [""] + anchors.fill: parent StackView { id: objectsStack anchors.fill: parent initialItem: "ObjectsTable.qml" - anchors.topMargin: Dimensions.m } } diff --git a/Gui/ObjectsTable.qml b/Gui/ObjectsTable.qml index 57b7c6a..6687559 100644 --- a/Gui/ObjectsTable.qml +++ b/Gui/ObjectsTable.qml @@ -5,6 +5,9 @@ import Qt.labs.qmlmodels ColumnLayout { + anchors.fill: parent + spacing: Dimensions.l + function viewCriterion(criterion) { business_model.viewCriterion(criterion.text); @@ -15,8 +18,6 @@ ColumnLayout if (added) object_model.viewCriterion("") } - anchors.fill: parent - Component.onCompleted: { contact_model.objectContactAdded.connect(onObjectContactAdded) @@ -24,9 +25,10 @@ ColumnLayout } RowLayout { + Layout.fillWidth: true + spacing: Dimensions.l SearchBar { - } QuickFilter { onSelectedChanged: (name) => { @@ -76,6 +78,9 @@ ColumnLayout ColumnLayout { id: tableColumn + Layout.fillWidth: true + Layout.fillHeight: true + Layout.verticalStretchFactor: 1 clip: true // anchors // { @@ -90,7 +95,6 @@ ColumnLayout id: horizontalHeaderview Layout.fillWidth: true implicitHeight: 40 - //visible: false movableColumns: true //@disable-check M16 syncView: objectTable @@ -175,40 +179,9 @@ ColumnLayout } } } - - // onContentWidthChanged: - // { - - // redrawTable.start() - // } } - - + Item { + Layout.fillWidth: true + } } - Item - { - - Layout.fillHeight: true - } - // function onObjectContactAdded(added) - // { - // console.log(added) - // if (added) object_model.viewCriterion("") - // } - // function viewCriterion(criterion) - // { - // object_model.viewCriterion(criterion.text) - // } - - // Component.onCompleted: - // { - // contact_model.objectContactAdded.connect(onObjectContactAdded) - // objectsStack.pop() - // } - - // function onObjectContactAdded(added) - // { - // console.log(added) - // if (added) object_model.viewCriterion("") - // } } diff --git a/Gui/OfferTable.qml b/Gui/OfferTable.qml index f71625c..519ceed 100644 --- a/Gui/OfferTable.qml +++ b/Gui/OfferTable.qml @@ -6,12 +6,13 @@ import Qt.labs.qmlmodels Item { + anchors.fill: parent StackView { - id: employeesStack + id: offersStack + anchors.fill: parent initialItem: "OffersTable.qml" - anchors.topMargin: Dimensions.m } } diff --git a/TeroStyle/Button.qml b/TeroStyle/Button.qml index c96c7cf..2810636 100644 --- a/TeroStyle/Button.qml +++ b/TeroStyle/Button.qml @@ -43,7 +43,7 @@ T.Button { border.color: Colors.interactive border.width: isFieldButton ? 1 : 0 bottomLeftRadius: topLeftRadius - color: Colors.primary + color: !control.hovered ? Colors.primary : Colors.primaryLighter radius: Dimensions.radius topLeftRadius: isFieldButton ? 0 : radius } diff --git a/TeroStyle/Colors.qml b/TeroStyle/Colors.qml index 3706c3c..bcc1df6 100644 --- a/TeroStyle/Colors.qml +++ b/TeroStyle/Colors.qml @@ -8,9 +8,10 @@ QtObject { property int theme: Application.styleHints.colorScheme === Qt.ColorScheme.Light ? light : dark - property color primary: "#b81a34" - property color primaryContrast: "#fdfdfd" - property color foreground: theme === dark ? "#fdfdfd" : "#110b0c" + readonly property color primary: "#b81a34" + readonly property color primaryContrast: "#fdfdfd" + readonly property color primaryLighter: Qt.lighter(primary, 1.5) + readonly property color foreground: theme === dark ? "#fdfdfd" : "#110b0c" readonly property color background: theme === dark ? "#303136" : "#eff1f5" readonly property color mantle: theme === dark ? "#1e1f22" : "#e7e9ef" readonly property color interactive: theme === dark ? "#878b97" : "#d9d9da" diff --git a/TeroStyle/QuickFilter.qml b/TeroStyle/QuickFilter.qml index e7b1113..05745f4 100644 --- a/TeroStyle/QuickFilter.qml +++ b/TeroStyle/QuickFilter.qml @@ -19,6 +19,7 @@ RowLayout { required property int index required property var modelData + property bool hovered: false property real padding: Dimensions.m height: text.height + padding * 2 @@ -28,7 +29,7 @@ RowLayout { anchors.fill: parent border.color: modelData.selected ? Colors.transparent : Colors.foreground border.width: 2 - color: modelData.selected ? Colors.primary : Colors.transparent + color: modelData.selected || mouseArea.containsMouse ? Colors.primary : Colors.transparent radius: parent.height } Text { @@ -41,6 +42,9 @@ RowLayout { y: parent.padding } MouseArea { + id: mouseArea + + hoverEnabled: true anchors.fill: parent cursorShape: Qt.PointingHandCursor