diff --git a/thirdparty/ComponentLibrary/CMakeLists.txt b/thirdparty/ComponentLibrary/CMakeLists.txt index a95bdfdb..bd528c4f 100644 --- a/thirdparty/ComponentLibrary/CMakeLists.txt +++ b/thirdparty/ComponentLibrary/CMakeLists.txt @@ -177,7 +177,9 @@ set_source_files_properties(ThemeEngine.qml PROPERTIES set_target_properties(ComponentLibrary PROPERTIES AUTOMOC ON) -target_link_libraries(ComponentLibrary PRIVATE Qt::Quick) +find_package(Qt6 REQUIRED COMPONENTS Qml Quick QuickControls2) + +target_link_libraries(ComponentLibrary PRIVATE Qt6::Qml Qt6::Quick Qt6::QuickControls2 Qt6::QmlModels) qt_add_qml_module(ComponentLibrary URI ComponentLibrary diff --git a/thirdparty/ComponentLibrary/controls/ScrollBarThemed.qml b/thirdparty/ComponentLibrary/controls/ScrollBarThemed.qml index 7fff31dc..f5dfcb3f 100644 --- a/thirdparty/ComponentLibrary/controls/ScrollBarThemed.qml +++ b/thirdparty/ComponentLibrary/controls/ScrollBarThemed.qml @@ -31,7 +31,7 @@ T.ScrollBar { name: "active" when: (control.policy === T.ScrollBar.AlwaysOn) || (control.active && control.size < 1.0) PropertyChanges { control.background.opacity: 0.75 } - PropertyChanges { control.contentItem.opacity: 0.75 } + PropertyChanges { control.contentItem.opacity: 1.0 } } transitions: Transition { diff --git a/thirdparty/ComponentLibrary/controls/SwitchThemed.qml b/thirdparty/ComponentLibrary/controls/SwitchThemed.qml index 1fc8228f..86c9c097 100644 --- a/thirdparty/ComponentLibrary/controls/SwitchThemed.qml +++ b/thirdparty/ComponentLibrary/controls/SwitchThemed.qml @@ -29,8 +29,11 @@ T.Switch { implicitWidth: control.www implicitHeight: Theme.componentHeight - x: control.text ? (control.mirrored ? control.width - width - control.rightPadding : control.leftPadding) : control.leftPadding + (control.availableWidth - width) / 2 + x: control.text ? + (control.mirrored ? control.width - width - control.rightPadding : control.leftPadding) : + (control.leftPadding + (control.availableWidth - width) / 2) y: control.topPadding + (control.availableHeight - height) / 2 + width: control.www height: control.hhh radius: control.hhh @@ -57,7 +60,8 @@ T.Switch { z: -1 radius: (width / 2) color: parent.color - opacity: enabled && (control.pressed || control.hovered || control.visualFocus) ? 0.2 : 0 + opacity: (control.enabled && control.checkable && (control.pressed || control.hovered || control.visualFocus)) ? + (control.checked ? 0.16 : 0.32) : 0 Behavior on opacity { NumberAnimation { duration: 133 } } } } diff --git a/thirdparty/ComponentLibrary/maps/MapButton.qml b/thirdparty/ComponentLibrary/maps/MapButton.qml index aff3212f..eb1b82a3 100644 --- a/thirdparty/ComponentLibrary/maps/MapButton.qml +++ b/thirdparty/ComponentLibrary/maps/MapButton.qml @@ -24,10 +24,10 @@ T.Button { property string highlightMode: "off" // available: off // colors - property string iconColor: Theme.colorIcon - property string highlightColor: Theme.colorPrimary - property string borderColor: Theme.colorSeparator - property string backgroundColor: Theme.colorLowContrast + property color iconColor: Theme.colorIcon + property color highlightColor: Theme.colorComponent + property color borderColor: Theme.colorSeparator + property color backgroundColor: Theme.colorLowContrast //////////////// @@ -54,17 +54,46 @@ T.Button { radius: control.radius color: control.backgroundColor } -/* - RippleThemed { + + Item { + id: bglayer anchors.fill: parent - anchor: control +/* + RippleThemed { + anchors.fill: parent + anchor: control + + clip: visible + pressed: control.pressed + active: enabled && (control.down || control.visualFocus || control.hovered) + color: Qt.rgba(control.highlightColor.r, control.highlightColor.g, control.highlightColor.b, 0.66) + } +*/ + Rectangle { // button_bg + anchors.fill: parent + color: control.highlightColor + opacity: control.hovered ? 0.66 : 0 + Behavior on opacity { NumberAnimation { duration: 333 } } + } - clip: visible - pressed: control.pressed - active: enabled && (control.down || control.visualFocus || control.hovered) - color: Qt.rgba(Theme.colorForeground.r, Theme.colorForeground.g, Theme.colorForeground.b, 0.9) + layer.enabled: true + layer.effect: MultiEffect { + maskEnabled: true + maskInverted: false + maskThresholdMin: 0.5 + maskSpreadAtMin: 1.0 + maskSpreadAtMax: 0.0 + maskSource: ShaderEffectSource { + sourceItem: Rectangle { + x: bglayer.x + y: bglayer.y + width: bglayer.width + height: bglayer.height + radius: control.radius + } + } + } } -*/ } //////////////// diff --git a/thirdparty/ComponentLibrary/maps/MapButtonCompass.qml b/thirdparty/ComponentLibrary/maps/MapButtonCompass.qml index b0168305..641eaa68 100644 --- a/thirdparty/ComponentLibrary/maps/MapButtonCompass.qml +++ b/thirdparty/ComponentLibrary/maps/MapButtonCompass.qml @@ -25,10 +25,10 @@ T.Button { property string highlightMode: "off" // available: off // colors - property string iconColor: Theme.colorIcon - property string highlightColor: Theme.colorPrimary - property string borderColor: Theme.colorSeparator - property string backgroundColor: Theme.colorLowContrast + property color iconColor: Theme.colorIcon + property color highlightColor: Theme.colorComponent + property color borderColor: Theme.colorSeparator + property color backgroundColor: Theme.colorLowContrast //////////////// @@ -55,17 +55,46 @@ T.Button { radius: control.radius color: control.backgroundColor } -/* - RippleThemed { + + Item { + id: bglayer anchors.fill: parent - anchor: control +/* + RippleThemed { + anchors.fill: parent + anchor: control + + clip: visible + pressed: control.pressed + active: enabled && (control.down || control.visualFocus || control.hovered) + color: Qt.rgba(control.highlightColor.r, control.highlightColor.g, control.highlightColor.b, 0.66) + } +*/ + Rectangle { // button_bg + anchors.fill: parent + color: control.highlightColor + opacity: control.hovered ? 0.66 : 0 + Behavior on opacity { NumberAnimation { duration: 333 } } + } - clip: visible - pressed: control.pressed - active: enabled && (control.down || control.visualFocus || control.hovered) - color: Qt.rgba(Theme.colorForeground.r, Theme.colorForeground.g, Theme.colorForeground.b, 0.9) + layer.enabled: true + layer.effect: MultiEffect { + maskEnabled: true + maskInverted: false + maskThresholdMin: 0.5 + maskSpreadAtMin: 1.0 + maskSpreadAtMax: 0.0 + maskSource: ShaderEffectSource { + sourceItem: Rectangle { + x: bglayer.x + y: bglayer.y + width: bglayer.width + height: bglayer.height + radius: control.radius + } + } + } } -*/ } //////////////// diff --git a/thirdparty/ComponentLibrary/maps/MapButtonZoom.qml b/thirdparty/ComponentLibrary/maps/MapButtonZoom.qml index eec60d8b..db3f8a2b 100644 --- a/thirdparty/ComponentLibrary/maps/MapButtonZoom.qml +++ b/thirdparty/ComponentLibrary/maps/MapButtonZoom.qml @@ -29,10 +29,10 @@ T.Button { property string highlightMode: "off" // available: off // colors - property string iconColor: Theme.colorIcon - property string highlightColor: Theme.colorPrimary - property string borderColor: Theme.colorSeparator - property string backgroundColor: Theme.colorLowContrast + property color iconColor: Theme.colorIcon + property color highlightColor: Theme.colorComponent + property color borderColor: Theme.colorSeparator + property color backgroundColor: Theme.colorLowContrast //////////////// @@ -69,7 +69,7 @@ T.Button { width: parent.width height: parent.width - color: Theme.colorComponent + color: control.highlightColor opacity: button1_ma.containsMouse ? 0.66 : 0 Behavior on opacity { NumberAnimation { duration: 333 } } } @@ -78,7 +78,7 @@ T.Button { width: parent.width height: parent.width - color: Theme.colorComponent + color: control.highlightColor opacity: button2_ma.containsMouse ? 0.66 : 0 Behavior on opacity { NumberAnimation { duration: 333 } } } diff --git a/thirdparty/ComponentLibrary/menus/ActionMenuItem.qml b/thirdparty/ComponentLibrary/menus/ActionMenuItem.qml index ff29b41d..eaaa0b2b 100644 --- a/thirdparty/ComponentLibrary/menus/ActionMenuItem.qml +++ b/thirdparty/ComponentLibrary/menus/ActionMenuItem.qml @@ -54,7 +54,7 @@ T.Button { pressed: control.pressed active: control.enabled && (control.down || control.visualFocus) - color: Qt.rgba(Theme.colorComponentDown.r, Theme.colorComponentDown.g, Theme.colorComponentDown.b, 0.666) + color: Qt.rgba(Theme.colorComponentDown.r, Theme.colorComponentDown.g, Theme.colorComponentDown.b, 0.66) } layer.enabled: true diff --git a/thirdparty/IconLibrary/IconLibrary.qrc b/thirdparty/IconLibrary/IconLibrary.qrc index c79b7920..36f9d91e 100644 --- a/thirdparty/IconLibrary/IconLibrary.qrc +++ b/thirdparty/IconLibrary/IconLibrary.qrc @@ -578,6 +578,7 @@ material-symbols/add_circle.svg material-symbols/add_circle-fill.svg material-symbols/altitude.svg + material-symbols/altitude-fill.svg material-symbols/android.svg material-symbols/archive.svg material-symbols/archive-fill.svg diff --git a/thirdparty/IconLibrary/material-symbols/altitude-fill.svg b/thirdparty/IconLibrary/material-symbols/altitude-fill.svg new file mode 100644 index 00000000..2e866ac5 --- /dev/null +++ b/thirdparty/IconLibrary/material-symbols/altitude-fill.svg @@ -0,0 +1 @@ + \ No newline at end of file