ui: 调整所有控件颜色跟随主题切换
This commit is contained in:
parent
588b7a4fcd
commit
82f4eceb1e
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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"
|
||||
}
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue