feat(qml):qml组件更新对应的quickitems主题颜色
This commit is contained in:
parent
2d08482c4c
commit
ade3df6014
|
@ -2,6 +2,7 @@ import QtQuick 2.12
|
||||||
import QtQuick.Layouts 1.12
|
import QtQuick.Layouts 1.12
|
||||||
import QtQuick.Controls 2.5
|
import QtQuick.Controls 2.5
|
||||||
import org.ukui.menu.core 1.0
|
import org.ukui.menu.core 1.0
|
||||||
|
import org.ukui.quick.platform 1.0 as Platform
|
||||||
import org.ukui.quick.items 1.0 as UkuiItems
|
import org.ukui.quick.items 1.0 as UkuiItems
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
|
@ -12,16 +13,16 @@ MouseArea {
|
||||||
when: control.activeFocus
|
when: control.activeFocus
|
||||||
PropertyChanges {
|
PropertyChanges {
|
||||||
target: controlBase
|
target: controlBase
|
||||||
borderColor: UkuiItems.Theme.Highlight
|
borderColor: Platform.Theme.Highlight
|
||||||
border.width: 2
|
border.width: 2
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
UkuiItems.StyleBackground {
|
UkuiItems.StyleBackground {
|
||||||
id: controlBase
|
id: controlBase
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
radius: UkuiItems.Theme.minRadius
|
radius: Platform.Theme.minRadius
|
||||||
useStyleTransparency: false
|
useStyleTransparency: false
|
||||||
paletteRole: UkuiItems.Theme.Text
|
paletteRole: Platform.Theme.Text
|
||||||
alpha: isSelect ? 1.00 : control.containsPress ? 0.16 : control.containsMouse ? 0.08 : 0.00
|
alpha: isSelect ? 1.00 : control.containsPress ? 0.16 : control.containsMouse ? 0.08 : 0.00
|
||||||
ToolTip.visible: content.textTruncated && control.containsMouse
|
ToolTip.visible: content.textTruncated && control.containsMouse
|
||||||
ToolTip.text: name
|
ToolTip.text: name
|
||||||
|
@ -60,7 +61,7 @@ MouseArea {
|
||||||
height: 28
|
height: 28
|
||||||
icon.width: 16
|
icon.width: 16
|
||||||
icon.height: 16
|
icon.height: 16
|
||||||
background.paletteRole: UkuiItems.Theme.Light
|
background.paletteRole: Platform.Theme.Light
|
||||||
background.alpha: 1
|
background.alpha: 1
|
||||||
activeFocusOnTab: false
|
activeFocusOnTab: false
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@ import QtQuick 2.12
|
||||||
import QtQuick.Layouts 1.12
|
import QtQuick.Layouts 1.12
|
||||||
import QtQuick.Controls 2.5
|
import QtQuick.Controls 2.5
|
||||||
import org.ukui.menu.core 1.0
|
import org.ukui.menu.core 1.0
|
||||||
|
import org.ukui.quick.platform 1.0 as Platform
|
||||||
import org.ukui.quick.items 1.0 as UkuiItems
|
import org.ukui.quick.items 1.0 as UkuiItems
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
|
@ -39,11 +40,11 @@ MouseArea {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
StyleBackground {
|
UkuiItems.StyleBackground {
|
||||||
id: controlBase
|
id: controlBase
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
radius: UkuiItems.Theme.minRadius
|
radius: Platform.Theme.minRadius
|
||||||
useStyleTransparent: false
|
useStyleTransparency: false
|
||||||
alpha: isSelect ? 0.55 : control.containsPress ? 0.82 : control.containsMouse ? 0.55 : 0.00
|
alpha: isSelect ? 0.55 : control.containsPress ? 0.82 : control.containsMouse ? 0.55 : 0.00
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
|
@ -55,7 +56,7 @@ MouseArea {
|
||||||
rows: 2; columns: 2
|
rows: 2; columns: 2
|
||||||
spacing: 2; padding: 2
|
spacing: 2; padding: 2
|
||||||
icons: icon
|
icons: icon
|
||||||
alpha: 0.12; radius: UkuiItems.Theme.minRadius
|
alpha: 0.12; radius: Platform.Theme.minRadius
|
||||||
Layout.alignment: Qt.AlignVCenter
|
Layout.alignment: Qt.AlignVCenter
|
||||||
Layout.preferredWidth: 32
|
Layout.preferredWidth: 32
|
||||||
Layout.preferredHeight: 32
|
Layout.preferredHeight: 32
|
||||||
|
@ -68,7 +69,7 @@ MouseArea {
|
||||||
|
|
||||||
Component {
|
Component {
|
||||||
id: unEditText
|
id: unEditText
|
||||||
StyleText {
|
UkuiItems.StyleText {
|
||||||
id: textShow
|
id: textShow
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
horizontalAlignment: Text.AlignLeft
|
horizontalAlignment: Text.AlignLeft
|
||||||
|
@ -83,13 +84,13 @@ MouseArea {
|
||||||
Component {
|
Component {
|
||||||
id: editText
|
id: editText
|
||||||
UkuiItems.StyleBackground {
|
UkuiItems.StyleBackground {
|
||||||
radius: UkuiItems.Theme.normalRadius
|
radius: Platform.Theme.normalRadius
|
||||||
useStyleTransparency: false
|
useStyleTransparency: false
|
||||||
alpha: textChange.activeFocus ? 0.04 : 0
|
alpha: textChange.activeFocus ? 0.04 : 0
|
||||||
paletteRole: UkuiItems.Theme.Text
|
paletteRole: Platform.Theme.Text
|
||||||
border.width: 2
|
border.width: 2
|
||||||
borderAlpha: textChange.activeFocus ? 1 : 0
|
borderAlpha: textChange.activeFocus ? 1 : 0
|
||||||
borderColor: UkuiItems.Theme.Highlight
|
borderColor: Platform.Theme.Highlight
|
||||||
|
|
||||||
TextInput {
|
TextInput {
|
||||||
id: textChange
|
id: textChange
|
||||||
|
|
|
@ -2,8 +2,8 @@ import QtQuick 2.0
|
||||||
import QtQuick.Layouts 1.12
|
import QtQuick.Layouts 1.12
|
||||||
import QtQuick.Controls 2.5
|
import QtQuick.Controls 2.5
|
||||||
import org.ukui.menu.core 1.0
|
import org.ukui.menu.core 1.0
|
||||||
|
import org.ukui.quick.platform 1.0 as Platform
|
||||||
import org.ukui.quick.items 1.0 as UkuiItems
|
import org.ukui.quick.items 1.0 as UkuiItems
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
id: control
|
id: control
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
|
@ -33,16 +33,16 @@ MouseArea {
|
||||||
border.width: 2
|
border.width: 2
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
StyleBackground {
|
UkuiItems.StyleBackground {
|
||||||
id: controlBase
|
id: controlBase
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
radius: UkuiItems.Theme.minRadius
|
radius: Platform.Theme.minRadius
|
||||||
useStyleTransparent: false
|
useStyleTransparency: false
|
||||||
alpha: control.containsPress ? 0.82 : control.containsMouse ? 0.55 : 0.00
|
alpha: control.containsPress ? 0.82 : control.containsMouse ? 0.55 : 0.00
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
StyleText {
|
UkuiItems.StyleText {
|
||||||
Layout.preferredHeight: parent.height
|
Layout.preferredHeight: parent.height
|
||||||
Layout.preferredWidth: contentWidth
|
Layout.preferredWidth: contentWidth
|
||||||
Layout.leftMargin: 12
|
Layout.leftMargin: 12
|
||||||
|
|
|
@ -20,6 +20,7 @@ import QtQuick 2.12
|
||||||
import QtQuick.Controls 2.12
|
import QtQuick.Controls 2.12
|
||||||
import QtQuick.Layouts 1.12
|
import QtQuick.Layouts 1.12
|
||||||
import AppControls2 1.0 as AppControls2
|
import AppControls2 1.0 as AppControls2
|
||||||
|
import org.ukui.quick.platform 1.0 as Platform
|
||||||
import org.ukui.quick.items 1.0 as UkuiItems
|
import org.ukui.quick.items 1.0 as UkuiItems
|
||||||
import org.ukui.menu.core 1.0
|
import org.ukui.menu.core 1.0
|
||||||
|
|
||||||
|
@ -40,7 +41,7 @@ MouseArea {
|
||||||
height: 1
|
height: 1
|
||||||
useStyleTransparency: false
|
useStyleTransparency: false
|
||||||
alpha: 0.15
|
alpha: 0.15
|
||||||
paletteRole: UkuiItems.Theme.Text
|
paletteRole: Platform.Theme.Text
|
||||||
visible: listView.contentY > 0
|
visible: listView.contentY > 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import QtQuick 2.12
|
import QtQuick 2.12
|
||||||
import QtQuick.Controls 2.5
|
import QtQuick.Controls 2.5
|
||||||
import org.ukui.menu.core 1.0
|
import org.ukui.menu.core 1.0
|
||||||
|
import org.ukui.quick.platform 1.0 as Platform
|
||||||
import org.ukui.quick.items 1.0 as UkuiItems
|
import org.ukui.quick.items 1.0 as UkuiItems
|
||||||
import org.ukui.menu.utils 1.0
|
import org.ukui.menu.utils 1.0
|
||||||
|
|
||||||
|
@ -15,7 +16,7 @@ Item {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.leftMargin: 16
|
anchors.leftMargin: 16
|
||||||
anchors.rightMargin: 16
|
anchors.rightMargin: 16
|
||||||
radius: UkuiItems.Theme.normalRadius
|
radius: Platform.Theme.normalRadius
|
||||||
changeFocusTarget: focusToPageContent
|
changeFocusTarget: focusToPageContent
|
||||||
visible: true
|
visible: true
|
||||||
onTextChanged: {
|
onTextChanged: {
|
||||||
|
@ -36,4 +37,3 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,7 @@ import QtQuick 2.12
|
||||||
import QtQuick.Layouts 1.12
|
import QtQuick.Layouts 1.12
|
||||||
import QtQuick.Controls 2.5
|
import QtQuick.Controls 2.5
|
||||||
import org.ukui.menu.core 1.0
|
import org.ukui.menu.core 1.0
|
||||||
|
import org.ukui.quick.platform 1.0 as Platform
|
||||||
import org.ukui.quick.items 1.0 as UkuiItems
|
import org.ukui.quick.items 1.0 as UkuiItems
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
|
@ -38,7 +39,7 @@ Item {
|
||||||
horizontalAlignment: contain.textCenterIn ? Text.AlignHCenter : Text.AlignLeft
|
horizontalAlignment: contain.textCenterIn ? Text.AlignHCenter : Text.AlignLeft
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
text: contain.textEdited
|
text: contain.textEdited
|
||||||
paletteRole: isFullScreenFolder ? UkuiItems.Theme.HighlightedText : UkuiItems.Theme.Text
|
paletteRole: isFullScreenFolder ? Platform.Theme.HighlightedText : Platform.Theme.Text
|
||||||
font.bold: !isFullScreenFolder
|
font.bold: !isFullScreenFolder
|
||||||
font.pointSize: isFullScreenFolder ? textUltra : systemFontSize
|
font.pointSize: isFullScreenFolder ? textUltra : systemFontSize
|
||||||
|
|
||||||
|
@ -56,13 +57,13 @@ Item {
|
||||||
Component {
|
Component {
|
||||||
id: editText
|
id: editText
|
||||||
UkuiItems.StyleBackground {
|
UkuiItems.StyleBackground {
|
||||||
radius: UkuiItems.Theme.normalRadius
|
radius: Platform.Theme.normalRadius
|
||||||
useStyleTransparency: false
|
useStyleTransparency: false
|
||||||
alpha: textEdit.activeFocus ? 0.04 : 0
|
alpha: textEdit.activeFocus ? 0.04 : 0
|
||||||
paletteRole: UkuiItems.Theme.Text
|
paletteRole: Platform.Theme.Text
|
||||||
border.width: 2
|
border.width: 2
|
||||||
borderAlpha: textEdit.activeFocus ? 1 : 0
|
borderAlpha: textEdit.activeFocus ? 1 : 0
|
||||||
borderColor: UkuiItems.Theme.Highlight
|
borderColor: Platform.Theme.Highlight
|
||||||
|
|
||||||
TextInput {
|
TextInput {
|
||||||
id: textEdit
|
id: textEdit
|
||||||
|
|
|
@ -22,6 +22,7 @@ import QtQml.Models 2.12
|
||||||
import QtQuick.Controls 2.5
|
import QtQuick.Controls 2.5
|
||||||
import org.ukui.menu.core 1.0
|
import org.ukui.menu.core 1.0
|
||||||
import AppControls2 1.0 as AppControls2
|
import AppControls2 1.0 as AppControls2
|
||||||
|
import org.ukui.quick.platform 1.0 as Platform
|
||||||
import org.ukui.quick.items 1.0 as UkuiItems
|
import org.ukui.quick.items 1.0 as UkuiItems
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
|
@ -89,12 +90,12 @@ RowLayout {
|
||||||
highlightMoveDuration: animationDuration
|
highlightMoveDuration: animationDuration
|
||||||
highlight: UkuiItems.StyleBackground {
|
highlight: UkuiItems.StyleBackground {
|
||||||
width: labelListView.maxLabelWidth; height: 30
|
width: labelListView.maxLabelWidth; height: 30
|
||||||
radius: UkuiItems.Theme.minRadius
|
radius: Platform.Theme.minRadius
|
||||||
useStyleTransparency: false
|
useStyleTransparency: false
|
||||||
paletteRole: UkuiItems.Theme.Light
|
paletteRole: Platform.Theme.Light
|
||||||
border.width: 1
|
border.width: 1
|
||||||
alpha: 0.18; borderAlpha: 0.7
|
alpha: 0.18; borderAlpha: 0.7
|
||||||
borderColor: UkuiItems.Theme.HighlightedText
|
borderColor: Platform.Theme.HighlightedText
|
||||||
}
|
}
|
||||||
onCountChanged: currentIndex = 0
|
onCountChanged: currentIndex = 0
|
||||||
|
|
||||||
|
@ -122,7 +123,7 @@ RowLayout {
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
UkuiItems.StyleText {
|
UkuiItems.StyleText {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
paletteRole: UkuiItems.Theme.HighlightedText
|
paletteRole: Platform.Theme.HighlightedText
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
@ -484,14 +485,14 @@ RowLayout {
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
width: contentWidth
|
width: contentWidth
|
||||||
text: name
|
text: name
|
||||||
paletteRole: UkuiItems.Theme.HighlightedText
|
paletteRole: Platform.Theme.HighlightedText
|
||||||
}
|
}
|
||||||
|
|
||||||
UkuiItems.StyleBackground {
|
UkuiItems.StyleBackground {
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
useStyleTransparency: false
|
useStyleTransparency: false
|
||||||
alpha: 0.14
|
alpha: 0.14
|
||||||
paletteRole: UkuiItems.Theme.Light
|
paletteRole: Platform.Theme.Light
|
||||||
height: 1
|
height: 1
|
||||||
width: parent.width - labelName.width - parent.spacing
|
width: parent.width - labelName.width - parent.spacing
|
||||||
}
|
}
|
||||||
|
@ -513,8 +514,8 @@ RowLayout {
|
||||||
UkuiItems.StyleBackground {
|
UkuiItems.StyleBackground {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
useStyleTransparency: false
|
useStyleTransparency: false
|
||||||
paletteRole: UkuiItems.Theme.Light
|
paletteRole: Platform.Theme.Light
|
||||||
radius: UkuiItems.Theme.maxRadius
|
radius: Platform.Theme.maxRadius
|
||||||
alpha: parent.containsPress ? 0.25 : parent.containsMouse ? 0.15 : 0.00
|
alpha: parent.containsPress ? 0.25 : parent.containsMouse ? 0.15 : 0.00
|
||||||
AppControls2.IconLabel {
|
AppControls2.IconLabel {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
@ -620,7 +621,7 @@ RowLayout {
|
||||||
|
|
||||||
background: UkuiItems.StyleBackground {
|
background: UkuiItems.StyleBackground {
|
||||||
useStyleTransparency: false
|
useStyleTransparency: false
|
||||||
paletteRole: UkuiItems.Theme.Dark
|
paletteRole: Platform.Theme.Dark
|
||||||
alpha: 0.25
|
alpha: 0.25
|
||||||
radius: width / 2
|
radius: width / 2
|
||||||
}
|
}
|
||||||
|
@ -628,7 +629,7 @@ RowLayout {
|
||||||
contentItem: UkuiItems.StyleBackground {
|
contentItem: UkuiItems.StyleBackground {
|
||||||
radius: width / 2
|
radius: width / 2
|
||||||
useStyleTransparency: false
|
useStyleTransparency: false
|
||||||
paletteRole: UkuiItems.Theme.Light
|
paletteRole: Platform.Theme.Light
|
||||||
alpha: fullScreenScrollBar.pressed ? 0.90 : fullScreenScrollBar.hovered ? 0.78 : 0.60
|
alpha: fullScreenScrollBar.pressed ? 0.90 : fullScreenScrollBar.hovered ? 0.78 : 0.60
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,6 +21,7 @@ import QtQml.Models 2.12
|
||||||
import QtQuick.Layouts 1.12
|
import QtQuick.Layouts 1.12
|
||||||
import QtQuick.Controls 2.5
|
import QtQuick.Controls 2.5
|
||||||
import org.ukui.menu.core 1.0
|
import org.ukui.menu.core 1.0
|
||||||
|
import org.ukui.quick.platform 1.0 as Platform
|
||||||
import org.ukui.quick.items 1.0 as UkuiItems
|
import org.ukui.quick.items 1.0 as UkuiItems
|
||||||
|
|
||||||
|
|
||||||
|
@ -56,7 +57,7 @@ Loader {
|
||||||
Item {
|
Item {
|
||||||
UkuiItems.StyleBackground {
|
UkuiItems.StyleBackground {
|
||||||
id: folderIconBase
|
id: folderIconBase
|
||||||
paletteRole: UkuiItems.Theme.Text
|
paletteRole: Platform.Theme.Text
|
||||||
useStyleTransparency: false
|
useStyleTransparency: false
|
||||||
property int folderIconSize: 0
|
property int folderIconSize: 0
|
||||||
property int iconSpacing: 0
|
property int iconSpacing: 0
|
||||||
|
@ -73,7 +74,7 @@ Loader {
|
||||||
target: folderIconBase
|
target: folderIconBase
|
||||||
width: 720
|
width: 720
|
||||||
height: viewMaxRow * 170 + margins * 2
|
height: viewMaxRow * 170 + margins * 2
|
||||||
radius: UkuiItems.Theme.maxRadius
|
radius: Platform.Theme.maxRadius
|
||||||
gridViewMargin: margins
|
gridViewMargin: margins
|
||||||
x: (parent.width - width) / 2
|
x: (parent.width - width) / 2
|
||||||
y: (parent.height - height) / 2
|
y: (parent.height - height) / 2
|
||||||
|
@ -91,7 +92,7 @@ Loader {
|
||||||
target: folderIconBase
|
target: folderIconBase
|
||||||
width: 86
|
width: 86
|
||||||
height: 86
|
height: 86
|
||||||
radius: UkuiItems.Theme.maxRadius
|
radius: Platform.Theme.maxRadius
|
||||||
gridViewMargin: 8
|
gridViewMargin: 8
|
||||||
x: root.mapFromGlobal(folderX, 0).x
|
x: root.mapFromGlobal(folderX, 0).x
|
||||||
y: root.mapFromGlobal(0, folderY).y
|
y: root.mapFromGlobal(0, folderY).y
|
||||||
|
@ -250,8 +251,8 @@ Loader {
|
||||||
UkuiItems.StyleBackground {
|
UkuiItems.StyleBackground {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
useStyleTransparency: false
|
useStyleTransparency: false
|
||||||
paletteRole: UkuiItems.Theme.Light
|
paletteRole: Platform.Theme.Light
|
||||||
radius: UkuiItems.Theme.maxRadius
|
radius: Platform.Theme.maxRadius
|
||||||
alpha: parent.containsPress ? 0.25 : parent.containsMouse ? 0.15 : 0.00
|
alpha: parent.containsPress ? 0.25 : parent.containsMouse ? 0.15 : 0.00
|
||||||
|
|
||||||
Image {
|
Image {
|
||||||
|
@ -269,7 +270,7 @@ Loader {
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
text: name
|
text: name
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
paletteRole: UkuiItems.Theme.HighlightedText
|
paletteRole: Platform.Theme.HighlightedText
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
onClicked: {
|
onClicked: {
|
||||||
|
|
|
@ -20,6 +20,7 @@ import QtQuick 2.12
|
||||||
import QtQuick.Layouts 1.12
|
import QtQuick.Layouts 1.12
|
||||||
import QtQuick.Controls 2.5
|
import QtQuick.Controls 2.5
|
||||||
|
|
||||||
|
import org.ukui.quick.platform 1.0 as Platform
|
||||||
import org.ukui.quick.items 1.0 as UkuiItems
|
import org.ukui.quick.items 1.0 as UkuiItems
|
||||||
import org.ukui.menu.core 1.0
|
import org.ukui.menu.core 1.0
|
||||||
import org.ukui.menu.utils 1.0
|
import org.ukui.menu.utils 1.0
|
||||||
|
@ -32,10 +33,10 @@ Row {
|
||||||
UkuiItems.StyleBackground {
|
UkuiItems.StyleBackground {
|
||||||
width: 48; height: width
|
width: 48; height: width
|
||||||
useStyleTransparency: false
|
useStyleTransparency: false
|
||||||
paletteRole: UkuiItems.Theme.Light
|
paletteRole: Platform.Theme.Light
|
||||||
alpha: powerButtonArea.containsPress ? 0.25 : powerButtonArea.containsMouse ? 0.12 : 0
|
alpha: powerButtonArea.containsPress ? 0.25 : powerButtonArea.containsMouse ? 0.12 : 0
|
||||||
radius: height / 2
|
radius: height / 2
|
||||||
borderColor: UkuiItems.Theme.Highlight
|
borderColor: Platform.Theme.Highlight
|
||||||
border.width: powerButtonArea.activeFocus ? 2 : 0
|
border.width: powerButtonArea.activeFocus ? 2 : 0
|
||||||
|
|
||||||
PowerButton {
|
PowerButton {
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import QtQuick 2.12
|
import QtQuick 2.12
|
||||||
import QtQuick.Layouts 1.12
|
import QtQuick.Layouts 1.12
|
||||||
import QtQuick.Controls 2.12
|
import QtQuick.Controls 2.12
|
||||||
|
import org.ukui.quick.platform 1.0 as Platform
|
||||||
import org.ukui.quick.items 1.0 as UkuiItems
|
import org.ukui.quick.items 1.0 as UkuiItems
|
||||||
import org.ukui.menu.core 1.0
|
import org.ukui.menu.core 1.0
|
||||||
import org.ukui.menu.utils 1.0
|
import org.ukui.menu.utils 1.0
|
||||||
|
@ -22,7 +23,7 @@ Item {
|
||||||
id: searchInputBar
|
id: searchInputBar
|
||||||
width: 372; height: 36
|
width: 372; height: 36
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
radius: UkuiItems.Theme.minRadius
|
radius: Platform.Theme.minRadius
|
||||||
visible: opacity
|
visible: opacity
|
||||||
|
|
||||||
onTextChanged: {
|
onTextChanged: {
|
||||||
|
@ -40,13 +41,13 @@ Item {
|
||||||
|
|
||||||
UkuiItems.StyleBackground {
|
UkuiItems.StyleBackground {
|
||||||
width: 48; height: width
|
width: 48; height: width
|
||||||
radius: UkuiItems.Theme.minRadius
|
radius: Platform.Theme.minRadius
|
||||||
useStyleTransparency: false
|
useStyleTransparency: false
|
||||||
paletteRole: UkuiItems.Theme.Light
|
paletteRole: Platform.Theme.Light
|
||||||
alpha: buttonMouseArea.containsPress ? 0.30 : buttonMouseArea.containsMouse ? 0.20 : 0.00
|
alpha: buttonMouseArea.containsPress ? 0.30 : buttonMouseArea.containsMouse ? 0.20 : 0.00
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
borderColor: UkuiItems.Theme.Highlight
|
borderColor: Platform.Theme.Highlight
|
||||||
border.width: buttonMouseArea.activeFocus ? 2 : 0
|
border.width: buttonMouseArea.activeFocus ? 2 : 0
|
||||||
|
|
||||||
ThemeIcon {
|
ThemeIcon {
|
||||||
|
@ -73,4 +74,3 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
import QtQuick 2.0
|
import QtQuick 2.0
|
||||||
import QtQuick.Layouts 1.12
|
import QtQuick.Layouts 1.12
|
||||||
|
import org.ukui.quick.platform 1.0 as Platform
|
||||||
import org.ukui.quick.items 1.0 as UkuiItems
|
import org.ukui.quick.items 1.0 as UkuiItems
|
||||||
import org.ukui.menu.core 1.0
|
import org.ukui.menu.core 1.0
|
||||||
|
|
||||||
UkuiItems.StyleBackground {
|
UkuiItems.StyleBackground {
|
||||||
paletteRole: UkuiItems.Theme.Dark
|
paletteRole: Platform.Theme.Dark
|
||||||
MouseArea {
|
MouseArea {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
onClicked: {
|
onClicked: {
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import QtQuick 2.12
|
import QtQuick 2.12
|
||||||
import org.ukui.menu.core 1.0
|
import org.ukui.menu.core 1.0
|
||||||
|
import org.ukui.quick.platform 1.0 as Platform
|
||||||
import org.ukui.quick.items 1.0 as UkuiItems
|
import org.ukui.quick.items 1.0 as UkuiItems
|
||||||
|
|
||||||
FocusScope {
|
FocusScope {
|
||||||
|
@ -35,7 +36,7 @@ FocusScope {
|
||||||
width: 1
|
width: 1
|
||||||
height: parent.height
|
height: parent.height
|
||||||
|
|
||||||
paletteRole: UkuiItems.Theme.ButtonText
|
paletteRole: Platform.Theme.ButtonText
|
||||||
useStyleTransparency: false
|
useStyleTransparency: false
|
||||||
alpha: 0.05
|
alpha: 0.05
|
||||||
}
|
}
|
||||||
|
@ -49,7 +50,7 @@ FocusScope {
|
||||||
width: 1
|
width: 1
|
||||||
height: parent.height
|
height: parent.height
|
||||||
|
|
||||||
paletteRole: UkuiItems.Theme.ButtonText
|
paletteRole: Platform.Theme.ButtonText
|
||||||
useStyleTransparency: false
|
useStyleTransparency: false
|
||||||
alpha: 0.05
|
alpha: 0.05
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,11 +22,12 @@ import QtQuick.Controls 2.12
|
||||||
|
|
||||||
import org.ukui.menu.core 1.0
|
import org.ukui.menu.core 1.0
|
||||||
import org.ukui.menu.utils 1.0
|
import org.ukui.menu.utils 1.0
|
||||||
|
import org.ukui.quick.platform 1.0 as Platform
|
||||||
import org.ukui.quick.items 1.0 as UkuiItems
|
import org.ukui.quick.items 1.0 as UkuiItems
|
||||||
|
|
||||||
UkuiItems.StyleBackground {
|
UkuiItems.StyleBackground {
|
||||||
useStyleTransparency: false
|
useStyleTransparency: false
|
||||||
paletteRole: UkuiItems.Theme.Text
|
paletteRole: Platform.Theme.Text
|
||||||
radius: childrenRect.width / 2
|
radius: childrenRect.width / 2
|
||||||
alpha: 0.06
|
alpha: 0.06
|
||||||
|
|
||||||
|
@ -62,7 +63,7 @@ UkuiItems.StyleBackground {
|
||||||
background.radius: width / 2
|
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 ? mainWindow.isFullScreen ? UkuiItems.Icon.AutoHighlight : UkuiItems.Icon.Normal : UkuiItems.Icon.Disabled
|
||||||
icon.source: pluginSortButtonRoot.model.getProviderIcon(0);
|
icon.source: pluginSortButtonRoot.model.getProviderIcon(0);
|
||||||
background.paletteRole: UkuiItems.Theme.Light
|
background.paletteRole: Platform.Theme.Light
|
||||||
background.alpha: parent.currentId === 0 ? 0.7 : 0
|
background.alpha: parent.currentId === 0 ? 0.7 : 0
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
|
@ -90,7 +91,7 @@ UkuiItems.StyleBackground {
|
||||||
background.radius: width / 2
|
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 ? mainWindow.isFullScreen ? UkuiItems.Icon.AutoHighlight : UkuiItems.Icon.Normal : UkuiItems.Icon.Disabled
|
||||||
icon.source: pluginSortButtonRoot.model.getProviderIcon(1);
|
icon.source: pluginSortButtonRoot.model.getProviderIcon(1);
|
||||||
background.paletteRole: UkuiItems.Theme.Light
|
background.paletteRole: Platform.Theme.Light
|
||||||
background.alpha: parent.currentId === 1 ? 0.7 : 0
|
background.alpha: parent.currentId === 1 ? 0.7 : 0
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
|
|
|
@ -21,6 +21,7 @@ import QtQuick.Controls 2.5
|
||||||
import QtQuick.Layouts 1.12
|
import QtQuick.Layouts 1.12
|
||||||
import org.ukui.menu.core 1.0
|
import org.ukui.menu.core 1.0
|
||||||
import AppControls2 1.0 as AppControls2
|
import AppControls2 1.0 as AppControls2
|
||||||
|
import org.ukui.quick.platform 1.0 as Platform
|
||||||
import org.ukui.quick.items 1.0 as UkuiItems
|
import org.ukui.quick.items 1.0 as UkuiItems
|
||||||
|
|
||||||
UkuiItems.StyleBackground {
|
UkuiItems.StyleBackground {
|
||||||
|
@ -29,10 +30,10 @@ UkuiItems.StyleBackground {
|
||||||
|
|
||||||
alpha: 0.04
|
alpha: 0.04
|
||||||
useStyleTransparency: false
|
useStyleTransparency: false
|
||||||
paletteRole: UkuiItems.Theme.Text
|
paletteRole: Platform.Theme.Text
|
||||||
border.width: 1
|
border.width: 1
|
||||||
borderAlpha: textInput.activeFocus ? 1 : 0.1
|
borderAlpha: textInput.activeFocus ? 1 : 0.1
|
||||||
borderColor: textInput.activeFocus ? UkuiItems.Theme.Highlight : UkuiItems.Theme.Base
|
borderColor: textInput.activeFocus ? Platform.Theme.Highlight : Platform.Theme.Base
|
||||||
|
|
||||||
Component.onCompleted: mainWindow.visibleChanged.connect(clear)
|
Component.onCompleted: mainWindow.visibleChanged.connect(clear)
|
||||||
Component.onDestruction: mainWindow.visibleChanged.disconnect(clear)
|
Component.onDestruction: mainWindow.visibleChanged.disconnect(clear)
|
||||||
|
@ -71,7 +72,7 @@ UkuiItems.StyleBackground {
|
||||||
anchors.left: searchIcon.right
|
anchors.left: searchIcon.right
|
||||||
text: qsTr("Search App")
|
text: qsTr("Search App")
|
||||||
visible: textInput.contentWidth === 0
|
visible: textInput.contentWidth === 0
|
||||||
paletteRole: mainWindow.isFullScreen ? UkuiItems.Theme.HighlightedText : UkuiItems.Theme.Text
|
paletteRole: mainWindow.isFullScreen ? Platform.Theme.HighlightedText : Platform.Theme.Text
|
||||||
verticalAlignment: TextInput.AlignVCenter
|
verticalAlignment: TextInput.AlignVCenter
|
||||||
alpha: 0.25
|
alpha: 0.25
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
import QtQuick 2.12
|
import QtQuick 2.12
|
||||||
import QtQuick.Layouts 1.2
|
import QtQuick.Layouts 1.2
|
||||||
import org.ukui.menu.core 1.0
|
import org.ukui.menu.core 1.0
|
||||||
|
import org.ukui.quick.platform 1.0 as Platform
|
||||||
import org.ukui.quick.items 1.0 as UkuiItems
|
import org.ukui.quick.items 1.0 as UkuiItems
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
|
@ -194,7 +195,7 @@ Item {
|
||||||
when: labelItem.activeFocus
|
when: labelItem.activeFocus
|
||||||
PropertyChanges {
|
PropertyChanges {
|
||||||
target: labelItem
|
target: labelItem
|
||||||
borderColor: UkuiItems.Theme.Highlight
|
borderColor: Platform.Theme.Highlight
|
||||||
border.width: 2
|
border.width: 2
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -224,4 +225,3 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,7 @@ import QtQuick.Controls 2.5
|
||||||
import org.ukui.menu.core 1.0
|
import org.ukui.menu.core 1.0
|
||||||
import org.ukui.menu.utils 1.0
|
import org.ukui.menu.utils 1.0
|
||||||
import org.ukui.menu.extension 1.0
|
import org.ukui.menu.extension 1.0
|
||||||
|
import org.ukui.quick.platform 1.0 as Platform
|
||||||
import org.ukui.quick.items 1.0 as UkuiItems
|
import org.ukui.quick.items 1.0 as UkuiItems
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
|
@ -54,7 +55,7 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
background.radius: UkuiItems.Theme.minRadius
|
background.radius: Platform.Theme.minRadius
|
||||||
icon.mode: UkuiItems.Icon.AutoHighlight
|
icon.mode: UkuiItems.Icon.AutoHighlight
|
||||||
icon.source: "view-fullscreen-symbolic"
|
icon.source: "view-fullscreen-symbolic"
|
||||||
}
|
}
|
||||||
|
@ -88,7 +89,7 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
background.radius: UkuiItems.Theme.minRadius
|
background.radius: Platform.Theme.minRadius
|
||||||
icon.mode: UkuiItems.Icon.AutoHighlight
|
icon.mode: UkuiItems.Icon.AutoHighlight
|
||||||
icon.source: totalUtils.iconFile
|
icon.source: totalUtils.iconFile
|
||||||
}
|
}
|
||||||
|
@ -113,7 +114,7 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
background.radius: UkuiItems.Theme.minRadius
|
background.radius: Platform.Theme.minRadius
|
||||||
icon.mode: UkuiItems.Icon.AutoHighlight
|
icon.mode: UkuiItems.Icon.AutoHighlight
|
||||||
icon.source: "computer-symbolic"
|
icon.source: "computer-symbolic"
|
||||||
}
|
}
|
||||||
|
@ -138,7 +139,7 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
background.radius: UkuiItems.Theme.minRadius
|
background.radius: Platform.Theme.minRadius
|
||||||
icon.mode: UkuiItems.Icon.AutoHighlight
|
icon.mode: UkuiItems.Icon.AutoHighlight
|
||||||
icon.source: "applications-system-symbolic"
|
icon.source: "applications-system-symbolic"
|
||||||
}
|
}
|
||||||
|
@ -172,7 +173,7 @@ Item {
|
||||||
powerButtonBase.clicked(mouse.button === Qt.LeftButton, buttonPosition.x + spacingFromMenu, buttonPosition.y + spacingFromMenu, mainWindow.isFullScreen);
|
powerButtonBase.clicked(mouse.button === Qt.LeftButton, buttonPosition.x + spacingFromMenu, buttonPosition.y + spacingFromMenu, mainWindow.isFullScreen);
|
||||||
}
|
}
|
||||||
|
|
||||||
background.radius: UkuiItems.Theme.minRadius
|
background.radius: Platform.Theme.minRadius
|
||||||
icon.mode: UkuiItems.Icon.AutoHighlight
|
icon.mode: UkuiItems.Icon.AutoHighlight
|
||||||
icon.source: powerButtonBase.icon
|
icon.source: powerButtonBase.icon
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,6 +22,7 @@ import QtQuick.Layouts 1.12
|
||||||
import QtQuick.Controls 2.5
|
import QtQuick.Controls 2.5
|
||||||
|
|
||||||
import AppControls2 1.0 as AppControls2
|
import AppControls2 1.0 as AppControls2
|
||||||
|
import org.ukui.quick.platform 1.0 as Platform
|
||||||
import org.ukui.quick.items 1.0 as UkuiItems
|
import org.ukui.quick.items 1.0 as UkuiItems
|
||||||
import org.ukui.menu.core 1.0
|
import org.ukui.menu.core 1.0
|
||||||
import org.ukui.menu.utils 1.0
|
import org.ukui.menu.utils 1.0
|
||||||
|
@ -71,7 +72,7 @@ Item {
|
||||||
useStyleTransparency: false
|
useStyleTransparency: false
|
||||||
paletteRole: Palette.Highlight
|
paletteRole: Palette.Highlight
|
||||||
alpha: 0
|
alpha: 0
|
||||||
radius: UkuiItems.Theme.minRadius
|
radius: Platform.Theme.minRadius
|
||||||
borderColor: Palette.Highlight
|
borderColor: Palette.Highlight
|
||||||
border.width: activeFocus ? 2 : 0
|
border.width: activeFocus ? 2 : 0
|
||||||
|
|
||||||
|
@ -108,7 +109,7 @@ Item {
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
font.bold: parent.ListView.isCurrentItem
|
font.bold: parent.ListView.isCurrentItem
|
||||||
|
|
||||||
paletteRole: parent.ListView.isCurrentItem ? UkuiItems.Theme.Highlight: UkuiItems.Theme.Text
|
paletteRole: parent.ListView.isCurrentItem ? Platform.Theme.Highlight: Platform.Theme.Text
|
||||||
text: model.name
|
text: model.name
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,7 @@ import QtQuick.Controls 2.5
|
||||||
import org.ukui.menu.core 1.0
|
import org.ukui.menu.core 1.0
|
||||||
import org.ukui.menu.extension 1.0
|
import org.ukui.menu.extension 1.0
|
||||||
import AppControls2 1.0 as AppControls2
|
import AppControls2 1.0 as AppControls2
|
||||||
|
import org.ukui.quick.platform 1.0 as Platform
|
||||||
import org.ukui.quick.items 1.0 as UkuiItems
|
import org.ukui.quick.items 1.0 as UkuiItems
|
||||||
|
|
||||||
UkuiMenuExtension {
|
UkuiMenuExtension {
|
||||||
|
@ -39,7 +40,7 @@ UkuiMenuExtension {
|
||||||
width: parent.width; height: 1
|
width: parent.width; height: 1
|
||||||
useStyleTransparency: false
|
useStyleTransparency: false
|
||||||
alpha: 0.15
|
alpha: 0.15
|
||||||
paletteRole: UkuiItems.Theme.Text
|
paletteRole: Platform.Theme.Text
|
||||||
visible: favoriteView.contentY > 0
|
visible: favoriteView.contentY > 0
|
||||||
z: 1
|
z: 1
|
||||||
}
|
}
|
||||||
|
@ -126,7 +127,7 @@ UkuiMenuExtension {
|
||||||
property bool hold: false
|
property bool hold: false
|
||||||
property int visualIndex: 0
|
property int visualIndex: 0
|
||||||
x: 0; y: 0
|
x: 0; y: 0
|
||||||
radius: UkuiItems.Theme.maxRadius
|
radius: Platform.Theme.maxRadius
|
||||||
useStyleTransparency: false
|
useStyleTransparency: false
|
||||||
scale: icon.hold ? 1.1 :1.0
|
scale: icon.hold ? 1.1 :1.0
|
||||||
alpha: control.containsPress ? 0.75 : control.containsMouse ? 0.6 : 0.40
|
alpha: control.containsPress ? 0.75 : control.containsMouse ? 0.6 : 0.40
|
||||||
|
|
Loading…
Reference in New Issue