ui: 调整所有控件颜色跟随主题切换

This commit is contained in:
hewenfei 2024-02-02 15:42:23 +08:00
parent 588b7a4fcd
commit 82f4eceb1e
6 changed files with 10 additions and 9 deletions

View File

@ -14,7 +14,7 @@ MouseArea {
UkuiItems.StyleBackground {
id: buttonBase
useStyleTransparency: false
paletteRole: mainWindow.isFullScreen ? Platform.Theme.Light : Platform.Theme.Text
paletteRole: Platform.Theme.Text
anchors.fill: parent
radius: height / 2
alpha: buttonMouseArea.containsPress ? 0.20 : buttonMouseArea.containsMouse ? 0.16 : 0.10

View File

@ -65,7 +65,7 @@ GridView {
border.width: (parent.GridView.isCurrentItem && !mainWindow.isFullScreen) ? 2 : 0
borderColor: Platform.Theme.Highlight
Text {
UkuiItems.StyleText {
anchors.fill: parent
visible: modelData.type === LabelItem.Text
text: modelData.display

View File

@ -61,7 +61,7 @@ UkuiItems.StyleBackground {
ToolTip.visible: containsMouse
background.radius: width / 2
icon.mode: parent.currentId === 0 ? mainWindow.isFullScreen ? UkuiItems.Icon.AutoHighlight : UkuiItems.Icon.Normal : UkuiItems.Icon.Disabled
icon.mode: parent.currentId === 0 ? UkuiItems.Icon.AutoHighlight : UkuiItems.Icon.Disabled
icon.source: pluginSortButtonRoot.model.getProviderIcon(0);
background.paletteRole: Platform.Theme.Light
background.alpha: parent.currentId === 0 ? 0.7 : 0
@ -89,7 +89,7 @@ UkuiItems.StyleBackground {
ToolTip.visible: containsMouse
background.radius: width / 2
icon.mode: parent.currentId === 1 ? mainWindow.isFullScreen ? UkuiItems.Icon.AutoHighlight : UkuiItems.Icon.Normal : UkuiItems.Icon.Disabled
icon.mode: parent.currentId === 1 ? UkuiItems.Icon.AutoHighlight : UkuiItems.Icon.Disabled
icon.source: pluginSortButtonRoot.model.getProviderIcon(1);
background.paletteRole: Platform.Theme.Light
background.alpha: parent.currentId === 1 ? 0.7 : 0

View File

@ -60,7 +60,7 @@ UkuiItems.StyleBackground {
anchors.centerIn: parent
width: parent.height / 2; height: width
source: "search-symbolic"
mode: mainWindow.isFullScreen ? UkuiItems.Icon.Highlight : UkuiItems.Icon.AutoHighlight
mode: UkuiItems.Icon.AutoHighlight
}
}
@ -71,7 +71,7 @@ UkuiItems.StyleBackground {
anchors.left: searchIcon.right
text: qsTr("Search App")
visible: textInput.contentWidth === 0
paletteRole: mainWindow.isFullScreen ? Platform.Theme.HighlightedText : Platform.Theme.Text
paletteRole: Platform.Theme.Text
verticalAlignment: TextInput.AlignVCenter
alpha: 0.25
}
@ -145,7 +145,7 @@ UkuiItems.StyleBackground {
background.radius: width/2
background.border.width: 1
icon.source: "edit-clear-symbolic"
icon.mode: mainWindow.isFullScreen ? UkuiItems.Icon.Highlight : UkuiItems.Icon.AutoHighlight
icon.mode: UkuiItems.Icon.AutoHighlight
onClicked: {
textInput.clear();

View File

@ -64,7 +64,7 @@ Item {
}
background.radius: Platform.Theme.minRadius
icon.mode: mainWindow.isFullScreen ? UkuiItems.Icon.Highlight : UkuiItems.Icon.AutoHighlight
icon.mode: UkuiItems.Icon.AutoHighlight
icon.source: mainWindow.isFullScreen ? "view-restore-symbolic" : "view-fullscreen-symbolic"
}

View File

@ -21,6 +21,7 @@ import AppUI 1.0 as AppUI
import AppControls2 1.0 as AppControls2
import org.ukui.menu.core 1.0
import org.ukui.quick.items 1.0 as UkuiItems
import org.ukui.quick.platform 1.0 as Platform
Item {
id: root
@ -109,7 +110,7 @@ Item {
x: 0; y: 0
height: normalScreenGeometry.normalGeometry.height
width: normalScreenGeometry.normalGeometry.width
radius: 12
radius: Platform.Theme.windowRadius
onHeightChanged: {
if (root.transparency <= 0.6 && root.onComlpeted) {