diff --git a/qml/AppUI/Sidebar.qml b/qml/AppUI/Sidebar.qml index 6447fff..fea7504 100644 --- a/qml/AppUI/Sidebar.qml +++ b/qml/AppUI/Sidebar.qml @@ -35,8 +35,9 @@ Item { anchors.bottomMargin: 12 spacing: 0 - MouseArea { + UkuiItems.Button { id: fullScreenbutton + visible: !isLiteMode Layout.preferredWidth: 36 Layout.preferredHeight: 36 @@ -46,10 +47,6 @@ Item { ToolTip.text: qsTr("Expand") ToolTip.visible: containsMouse - visible: !isLiteMode - hoverEnabled: true - activeFocusOnTab: true - onClicked: mainWindow.isFullScreen = true Keys.onPressed: { if (event.key === Qt.Key_Enter || event.key === Qt.Key_Return) { @@ -57,24 +54,12 @@ Item { } } - UkuiItems.StyleBackground { - anchors.fill: parent - radius: 4 - useStyleTransparency: false - paletteRole: UkuiItems.Theme.Button - alpha: parent.containsPress ? 1 : parent.containsMouse ? 0.7 : 0 - borderColor: UkuiItems.Theme.Highlight - border.width: parent.activeFocus ? 2 : 0 - - ThemeIcon { - anchors.centerIn: parent - width: 16; height: 16 - source: "view-fullscreen-symbolic" - } - } + background.radius: 4 + icon.mode: UkuiItems.Icon.AutoHighlight + icon.source: "view-fullscreen-symbolic" } - MouseArea { + UkuiItems.Button { id: powerButton Layout.preferredWidth: 36 Layout.preferredHeight: 36 @@ -84,8 +69,10 @@ Item { ToolTip.visible: containsMouse ToolTip.text: powerButtonBase.toolTip - hoverEnabled: true - activeFocusOnTab: true + PowerButton { + id: powerButtonBase + } + acceptedButtons: Qt.LeftButton | Qt.RightButton property int spacingFromMenu: 16 @@ -100,26 +87,9 @@ Item { powerButtonBase.clicked(mouse.button === Qt.LeftButton, buttonPosition.x + spacingFromMenu, buttonPosition.y + spacingFromMenu, mainWindow.isFullScreen); } - UkuiItems.StyleBackground { - anchors.fill: parent - paletteRole: UkuiItems.Theme.Button - useStyleTransparency: false - alpha: parent.containsPress ? 1 : parent.containsMouse ? 0.7 : 0 - radius: 4 - borderColor: UkuiItems.Theme.Highlight - border.width: parent.activeFocus ? 2 : 0 - - PowerButton { - id: powerButtonBase - } - - ThemeIcon { - anchors.centerIn: parent - width: 16 - height: 16 - source: powerButtonBase.icon - } - } + background.radius: 4 + icon.mode: UkuiItems.Icon.AutoHighlight + icon.source: powerButtonBase.icon } } }