feat(qml): 开始菜单ui适配主题圆角
This commit is contained in:
parent
dd31bd9822
commit
3cfba996d4
|
@ -19,7 +19,7 @@ MouseArea {
|
||||||
UkuiItems.StyleBackground {
|
UkuiItems.StyleBackground {
|
||||||
id: controlBase
|
id: controlBase
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
radius: 4
|
radius: UkuiItems.Theme.minRadius
|
||||||
useStyleTransparency: false
|
useStyleTransparency: false
|
||||||
paletteRole: UkuiItems.Theme.Text
|
paletteRole: UkuiItems.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
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import QtQuick 2.12
|
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 AppControls2 1.0 as AppControls2
|
|
||||||
import org.ukui.menu.core 1.0
|
import org.ukui.menu.core 1.0
|
||||||
|
import org.ukui.quick.items 1.0 as UkuiItems
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
id: control
|
id: control
|
||||||
|
@ -42,7 +42,7 @@ MouseArea {
|
||||||
StyleBackground {
|
StyleBackground {
|
||||||
id: controlBase
|
id: controlBase
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
radius: 4
|
radius: UkuiItems.Theme.minRadius
|
||||||
useStyleTransparent: false
|
useStyleTransparent: 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
|
||||||
|
|
||||||
|
@ -55,7 +55,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: 4
|
alpha: 0.12; radius: UkuiItems.Theme.minRadius
|
||||||
Layout.alignment: Qt.AlignVCenter
|
Layout.alignment: Qt.AlignVCenter
|
||||||
Layout.preferredWidth: 32
|
Layout.preferredWidth: 32
|
||||||
Layout.preferredHeight: 32
|
Layout.preferredHeight: 32
|
||||||
|
@ -82,14 +82,14 @@ MouseArea {
|
||||||
|
|
||||||
Component {
|
Component {
|
||||||
id: editText
|
id: editText
|
||||||
AppControls2.StyleBackground {
|
UkuiItems.StyleBackground {
|
||||||
radius: 6
|
radius: UkuiItems.Theme.normalRadius
|
||||||
useStyleTransparent: false
|
useStyleTransparency: false
|
||||||
alpha: textChange.activeFocus ? 0.04 : 0
|
alpha: textChange.activeFocus ? 0.04 : 0
|
||||||
paletteRole: Palette.Text
|
paletteRole: UkuiItems.Theme.Text
|
||||||
border.width: 2
|
border.width: 2
|
||||||
borderAlpha: textChange.activeFocus ? 1 : 0
|
borderAlpha: textChange.activeFocus ? 1 : 0
|
||||||
borderColor: Palette.Highlight
|
borderColor: UkuiItems.Theme.Highlight
|
||||||
|
|
||||||
TextInput {
|
TextInput {
|
||||||
id: textChange
|
id: textChange
|
||||||
|
|
|
@ -2,6 +2,7 @@ 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.items 1.0 as UkuiItems
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
id: control
|
id: control
|
||||||
|
@ -35,7 +36,7 @@ MouseArea {
|
||||||
StyleBackground {
|
StyleBackground {
|
||||||
id: controlBase
|
id: controlBase
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
radius: 4
|
radius: UkuiItems.Theme.minRadius
|
||||||
useStyleTransparent: false
|
useStyleTransparent: false
|
||||||
alpha: control.containsPress ? 0.82 : control.containsMouse ? 0.55 : 0.00
|
alpha: control.containsPress ? 0.82 : control.containsMouse ? 0.55 : 0.00
|
||||||
|
|
||||||
|
|
|
@ -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.items 1.0 as UkuiItems
|
||||||
import org.ukui.menu.core 1.0
|
import org.ukui.menu.core 1.0
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
|
@ -33,6 +34,16 @@ MouseArea {
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
clip: true
|
clip: true
|
||||||
|
|
||||||
|
UkuiItems.StyleBackground {
|
||||||
|
anchors.top: parent.top
|
||||||
|
width: parent.width
|
||||||
|
height: 1
|
||||||
|
useStyleTransparency: false
|
||||||
|
alpha: 0.15
|
||||||
|
paletteRole: UkuiItems.Theme.Text
|
||||||
|
visible: listView.contentY > 0
|
||||||
|
}
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
spacing: 0
|
spacing: 0
|
||||||
|
|
|
@ -1,7 +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 AppControls2 1.0 as AppControls2
|
import org.ukui.quick.items 1.0 as UkuiItems
|
||||||
import org.ukui.menu.utils 1.0
|
import org.ukui.menu.utils 1.0
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
|
@ -15,7 +15,7 @@ Item {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.leftMargin: 16
|
anchors.leftMargin: 16
|
||||||
anchors.rightMargin: 16
|
anchors.rightMargin: 16
|
||||||
radius: 6 //change theme
|
radius: UkuiItems.Theme.normalRadius
|
||||||
changeFocusTarget: focusToPageContent
|
changeFocusTarget: focusToPageContent
|
||||||
visible: true
|
visible: true
|
||||||
onTextChanged: {
|
onTextChanged: {
|
||||||
|
|
|
@ -19,8 +19,8 @@
|
||||||
import QtQuick 2.12
|
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 AppControls2 1.0 as AppControls2
|
|
||||||
import org.ukui.menu.core 1.0
|
import org.ukui.menu.core 1.0
|
||||||
|
import org.ukui.quick.items 1.0 as UkuiItems
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: contain
|
id: contain
|
||||||
|
@ -32,13 +32,13 @@ Item {
|
||||||
|
|
||||||
Component {
|
Component {
|
||||||
id: unEditText
|
id: unEditText
|
||||||
AppControls2.StyleText {
|
UkuiItems.StyleText {
|
||||||
id: textShow
|
id: textShow
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
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 ? Palette.HighlightedText : Palette.Text
|
paletteRole: isFullScreenFolder ? UkuiItems.Theme.HighlightedText : UkuiItems.Theme.Text
|
||||||
font.bold: !isFullScreenFolder
|
font.bold: !isFullScreenFolder
|
||||||
font.pointSize: isFullScreenFolder ? textUltra : systemFontSize
|
font.pointSize: isFullScreenFolder ? textUltra : systemFontSize
|
||||||
|
|
||||||
|
@ -55,14 +55,14 @@ Item {
|
||||||
|
|
||||||
Component {
|
Component {
|
||||||
id: editText
|
id: editText
|
||||||
AppControls2.StyleBackground {
|
UkuiItems.StyleBackground {
|
||||||
radius: 6
|
radius: UkuiItems.Theme.normalRadius
|
||||||
useStyleTransparent: false
|
useStyleTransparency: false
|
||||||
alpha: textEdit.activeFocus ? 0.04 : 0
|
alpha: textEdit.activeFocus ? 0.04 : 0
|
||||||
paletteRole: Palette.Text
|
paletteRole: UkuiItems.Theme.Text
|
||||||
border.width: 2
|
border.width: 2
|
||||||
borderAlpha: textEdit.activeFocus ? 1 : 0
|
borderAlpha: textEdit.activeFocus ? 1 : 0
|
||||||
borderColor: Palette.Highlight
|
borderColor: UkuiItems.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.items 1.0 as UkuiItems
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
id: root
|
id: root
|
||||||
|
@ -86,14 +87,14 @@ RowLayout {
|
||||||
interactive: contentHeight > parent.height
|
interactive: contentHeight > parent.height
|
||||||
|
|
||||||
highlightMoveDuration: animationDuration
|
highlightMoveDuration: animationDuration
|
||||||
highlight: AppControls2.StyleBackground {
|
highlight: UkuiItems.StyleBackground {
|
||||||
width: labelListView.maxLabelWidth; height: 30
|
width: labelListView.maxLabelWidth; height: 30
|
||||||
radius: 4
|
radius: UkuiItems.Theme.minRadius
|
||||||
useStyleTransparent: false
|
useStyleTransparency: false
|
||||||
paletteRole: Palette.Light
|
paletteRole: UkuiItems.Theme.Light
|
||||||
border.width: 1
|
border.width: 1
|
||||||
alpha: 0.18; borderAlpha: 0.7
|
alpha: 0.18; borderAlpha: 0.7
|
||||||
borderColor: Palette.HighlightedText
|
borderColor: UkuiItems.Theme.HighlightedText
|
||||||
}
|
}
|
||||||
onCountChanged: currentIndex = 0
|
onCountChanged: currentIndex = 0
|
||||||
|
|
||||||
|
@ -119,9 +120,9 @@ RowLayout {
|
||||||
width: labelListView.maxLabelWidth
|
width: labelListView.maxLabelWidth
|
||||||
height: 30
|
height: 30
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
AppControls2.StyleText {
|
UkuiItems.StyleText {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
paletteRole: Palette.HighlightedText
|
paletteRole: UkuiItems.Theme.HighlightedText
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
@ -477,20 +478,20 @@ RowLayout {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.leftMargin: 67
|
anchors.leftMargin: 67
|
||||||
spacing: 15
|
spacing: 15
|
||||||
AppControls2.StyleText {
|
UkuiItems.StyleText {
|
||||||
id: labelName
|
id: labelName
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
width: contentWidth
|
width: contentWidth
|
||||||
text: name
|
text: name
|
||||||
paletteRole: Palette.HighlightedText
|
paletteRole: UkuiItems.Theme.HighlightedText
|
||||||
}
|
}
|
||||||
|
|
||||||
AppControls2.StyleBackground {
|
UkuiItems.StyleBackground {
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
useStyleTransparent: false
|
useStyleTransparency: false
|
||||||
alpha: 0.14
|
alpha: 0.14
|
||||||
paletteRole: Palette.Light
|
paletteRole: UkuiItems.Theme.Light
|
||||||
height: 1
|
height: 1
|
||||||
width: parent.width - labelName.width - parent.spacing
|
width: parent.width - labelName.width - parent.spacing
|
||||||
}
|
}
|
||||||
|
@ -509,11 +510,11 @@ RowLayout {
|
||||||
width: 170; height: width
|
width: 170; height: width
|
||||||
acceptedButtons: Qt.LeftButton | Qt.RightButton
|
acceptedButtons: Qt.LeftButton | Qt.RightButton
|
||||||
|
|
||||||
AppControls2.StyleBackground {
|
UkuiItems.StyleBackground {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
useStyleTransparent: false
|
useStyleTransparency: false
|
||||||
paletteRole: Palette.Light
|
paletteRole: UkuiItems.Theme.Light
|
||||||
radius: 16
|
radius: UkuiItems.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
|
||||||
|
@ -552,7 +553,9 @@ RowLayout {
|
||||||
labelListView.currentIndex = labelRepeater.count - 1
|
labelListView.currentIndex = labelRepeater.count - 1
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
labelListView.currentIndex = labelColumn.childAt(contentX, contentY + 200).labelIndex
|
if (labelColumn.childAt(contentX,contentY) !== null) {
|
||||||
|
labelListView.currentIndex = labelColumn.childAt(contentX,contentY).labelIndex
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
NumberAnimation {
|
NumberAnimation {
|
||||||
|
@ -615,17 +618,17 @@ RowLayout {
|
||||||
NumberAnimation { duration: 200; easing.type: Easing.InOutQuad }
|
NumberAnimation { duration: 200; easing.type: Easing.InOutQuad }
|
||||||
}
|
}
|
||||||
|
|
||||||
background: AppControls2.StyleBackground {
|
background: UkuiItems.StyleBackground {
|
||||||
useStyleTransparent: false
|
useStyleTransparency: false
|
||||||
paletteRole: Palette.Dark
|
paletteRole: UkuiItems.Theme.Dark
|
||||||
alpha: 0.25
|
alpha: 0.25
|
||||||
radius: width / 2
|
radius: width / 2
|
||||||
}
|
}
|
||||||
|
|
||||||
contentItem: AppControls2.StyleBackground {
|
contentItem: UkuiItems.StyleBackground {
|
||||||
radius: width / 2
|
radius: width / 2
|
||||||
useStyleTransparent: false
|
useStyleTransparency: false
|
||||||
paletteRole: Palette.Light
|
paletteRole: UkuiItems.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,7 +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 AppControls2 1.0 as AppControls2
|
import org.ukui.quick.items 1.0 as UkuiItems
|
||||||
|
|
||||||
|
|
||||||
Loader {
|
Loader {
|
||||||
|
@ -54,10 +54,10 @@ Loader {
|
||||||
Component {
|
Component {
|
||||||
id: folderComponent
|
id: folderComponent
|
||||||
Item {
|
Item {
|
||||||
AppControls2.StyleBackground {
|
UkuiItems.StyleBackground {
|
||||||
id: folderIconBase
|
id: folderIconBase
|
||||||
paletteRole: Palette.Text
|
paletteRole: UkuiItems.Theme.Text
|
||||||
useStyleTransparent: false
|
useStyleTransparency: false
|
||||||
property int folderIconSize: 0
|
property int folderIconSize: 0
|
||||||
property int iconSpacing: 0
|
property int iconSpacing: 0
|
||||||
property int imageX: 0
|
property int imageX: 0
|
||||||
|
@ -73,7 +73,7 @@ Loader {
|
||||||
target: folderIconBase
|
target: folderIconBase
|
||||||
width: 720
|
width: 720
|
||||||
height: viewMaxRow * 170 + margins * 2
|
height: viewMaxRow * 170 + margins * 2
|
||||||
radius: 36
|
radius: UkuiItems.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 +91,7 @@ Loader {
|
||||||
target: folderIconBase
|
target: folderIconBase
|
||||||
width: 86
|
width: 86
|
||||||
height: 86
|
height: 86
|
||||||
radius: 16
|
radius: UkuiItems.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
|
||||||
|
@ -247,11 +247,11 @@ Loader {
|
||||||
width: GridView.view.cellWidth; height: GridView.view.cellHeight
|
width: GridView.view.cellWidth; height: GridView.view.cellHeight
|
||||||
acceptedButtons: Qt.LeftButton | Qt.RightButton
|
acceptedButtons: Qt.LeftButton | Qt.RightButton
|
||||||
|
|
||||||
AppControls2.StyleBackground {
|
UkuiItems.StyleBackground {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
useStyleTransparent: false
|
useStyleTransparency: false
|
||||||
paletteRole: Palette.Light
|
paletteRole: UkuiItems.Theme.Light
|
||||||
radius: 16
|
radius: UkuiItems.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 {
|
||||||
|
@ -261,7 +261,7 @@ Loader {
|
||||||
x: folderIconBase.imageX; y: folderIconBase.imageY
|
x: folderIconBase.imageX; y: folderIconBase.imageY
|
||||||
}
|
}
|
||||||
|
|
||||||
AppControls2.StyleText {
|
UkuiItems.StyleText {
|
||||||
width: parent.width
|
width: parent.width
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
anchors.top: iconImage.bottom
|
anchors.top: iconImage.bottom
|
||||||
|
@ -269,7 +269,7 @@ Loader {
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
text: name
|
text: name
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
paletteRole: Palette.HighlightedText
|
paletteRole: UkuiItems.Theme.HighlightedText
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
onClicked: {
|
onClicked: {
|
||||||
|
|
|
@ -20,7 +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 AppControls2 1.0 as AppControls2
|
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
|
||||||
|
|
||||||
|
@ -29,13 +29,13 @@ Row {
|
||||||
Layout.preferredHeight: 48
|
Layout.preferredHeight: 48
|
||||||
layoutDirection: Qt.RightToLeft
|
layoutDirection: Qt.RightToLeft
|
||||||
|
|
||||||
AppControls2.StyleBackground {
|
UkuiItems.StyleBackground {
|
||||||
width: 48; height: width
|
width: 48; height: width
|
||||||
useStyleTransparent: false
|
useStyleTransparency: false
|
||||||
paletteRole: Palette.Light
|
paletteRole: UkuiItems.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: Palette.Highlight
|
borderColor: UkuiItems.Theme.Highlight
|
||||||
border.width: powerButtonArea.activeFocus ? 2 : 0
|
border.width: powerButtonArea.activeFocus ? 2 : 0
|
||||||
|
|
||||||
PowerButton {
|
PowerButton {
|
||||||
|
|
|
@ -1,7 +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 AppControls2 1.0 as AppControls2
|
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,12 +22,12 @@ Item {
|
||||||
id: searchInputBar
|
id: searchInputBar
|
||||||
width: 372; height: 36
|
width: 372; height: 36
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
radius: 4 //change theme
|
radius: UkuiItems.Theme.minRadius
|
||||||
visible: opacity
|
visible: opacity
|
||||||
|
|
||||||
onTextChanged: {
|
onTextChanged: {
|
||||||
if (text === "") {
|
if (text === "") {
|
||||||
pluginSelectButton.model.reactivateProvider();
|
appPageHeaderUtils.model(PluginGroup.SortMenuItem).reactivateProvider();
|
||||||
} else {
|
} else {
|
||||||
appPageHeaderUtils.model(PluginGroup.Button).reactivateProvider();
|
appPageHeaderUtils.model(PluginGroup.Button).reactivateProvider();
|
||||||
appPageHeaderUtils.startSearch(text);
|
appPageHeaderUtils.startSearch(text);
|
||||||
|
@ -38,15 +38,15 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
AppControls2.StyleBackground {
|
UkuiItems.StyleBackground {
|
||||||
width: 48; height: width
|
width: 48; height: width
|
||||||
radius: 4
|
radius: UkuiItems.Theme.minRadius
|
||||||
useStyleTransparent: false
|
useStyleTransparency: false
|
||||||
paletteRole: Palette.Light
|
paletteRole: UkuiItems.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: Palette.Highlight
|
borderColor: UkuiItems.Theme.Highlight
|
||||||
border.width: buttonMouseArea.activeFocus ? 2 : 0
|
border.width: buttonMouseArea.activeFocus ? 2 : 0
|
||||||
|
|
||||||
ThemeIcon {
|
ThemeIcon {
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
import QtQuick 2.0
|
import QtQuick 2.0
|
||||||
import QtQuick.Layouts 1.12
|
import QtQuick.Layouts 1.12
|
||||||
import AppControls2 1.0 as AppControls2
|
import org.ukui.quick.items 1.0 as UkuiItems
|
||||||
import org.ukui.menu.core 1.0
|
import org.ukui.menu.core 1.0
|
||||||
|
|
||||||
AppControls2.StyleBackground {
|
UkuiItems.StyleBackground {
|
||||||
paletteRole: Palette.Dark
|
paletteRole: UkuiItems.Theme.Dark
|
||||||
MouseArea {
|
MouseArea {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
onClicked: {
|
onClicked: {
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
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.items 1.0 as UkuiItems
|
import org.ukui.quick.items 1.0 as UkuiItems
|
||||||
|
|
||||||
FocusScope {
|
FocusScope {
|
||||||
|
|
|
@ -20,7 +20,6 @@ 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 AppControls2 1.0 as AppControls2
|
|
||||||
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.items 1.0 as UkuiItems
|
import org.ukui.quick.items 1.0 as UkuiItems
|
||||||
|
|
|
@ -19,7 +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 AppControls2 1.0 as AppControls2
|
import org.ukui.quick.items 1.0 as UkuiItems
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: root
|
id: root
|
||||||
|
@ -173,7 +173,7 @@ Item {
|
||||||
]
|
]
|
||||||
|
|
||||||
model: modelManager.getLabelModel()
|
model: modelManager.getLabelModel()
|
||||||
delegate: AppControls2.StyleBackground {
|
delegate: UkuiItems.StyleBackground {
|
||||||
id: labelItem
|
id: labelItem
|
||||||
height: selectionArea.itemHeight; width: selectionArea.itemWidth
|
height: selectionArea.itemHeight; width: selectionArea.itemWidth
|
||||||
property int index: model.index
|
property int index: model.index
|
||||||
|
@ -181,7 +181,7 @@ Item {
|
||||||
property string displayName: model.displayName
|
property string displayName: model.displayName
|
||||||
property string id: model.id
|
property string id: model.id
|
||||||
alpha: (itemMouseArea.containsPress && !model.isDisable) ? 0.82 : (itemMouseArea.containsMouse && !model.isDisable) ? 0.55 : 0.00
|
alpha: (itemMouseArea.containsPress && !model.isDisable) ? 0.82 : (itemMouseArea.containsMouse && !model.isDisable) ? 0.55 : 0.00
|
||||||
useStyleTransparent: false
|
useStyleTransparency: false
|
||||||
radius: 8
|
radius: 8
|
||||||
focus: true
|
focus: true
|
||||||
Keys.onPressed: {
|
Keys.onPressed: {
|
||||||
|
@ -194,11 +194,11 @@ Item {
|
||||||
when: labelItem.activeFocus
|
when: labelItem.activeFocus
|
||||||
PropertyChanges {
|
PropertyChanges {
|
||||||
target: labelItem
|
target: labelItem
|
||||||
borderColor: Palette.Highlight
|
borderColor: UkuiItems.Theme.Highlight
|
||||||
border.width: 2
|
border.width: 2
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
AppControls2.StyleText {
|
UkuiItems.StyleText {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
text: model.displayName
|
text: model.displayName
|
||||||
alpha: model.isDisable ? 0.2 : 0.9
|
alpha: model.isDisable ? 0.2 : 0.9
|
||||||
|
|
|
@ -54,7 +54,7 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
background.radius: 4
|
background.radius: UkuiItems.Theme.minRadius
|
||||||
icon.mode: UkuiItems.Icon.AutoHighlight
|
icon.mode: UkuiItems.Icon.AutoHighlight
|
||||||
icon.source: "view-fullscreen-symbolic"
|
icon.source: "view-fullscreen-symbolic"
|
||||||
}
|
}
|
||||||
|
@ -88,7 +88,7 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
background.radius: 4
|
background.radius: UkuiItems.Theme.minRadius
|
||||||
icon.mode: UkuiItems.Icon.AutoHighlight
|
icon.mode: UkuiItems.Icon.AutoHighlight
|
||||||
icon.source: totalUtils.iconFile
|
icon.source: totalUtils.iconFile
|
||||||
}
|
}
|
||||||
|
@ -113,7 +113,7 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
background.radius: 4
|
background.radius: UkuiItems.Theme.minRadius
|
||||||
icon.mode: UkuiItems.Icon.AutoHighlight
|
icon.mode: UkuiItems.Icon.AutoHighlight
|
||||||
icon.source: "computer-symbolic"
|
icon.source: "computer-symbolic"
|
||||||
}
|
}
|
||||||
|
@ -138,7 +138,7 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
background.radius: 4
|
background.radius: UkuiItems.Theme.minRadius
|
||||||
icon.mode: UkuiItems.Icon.AutoHighlight
|
icon.mode: UkuiItems.Icon.AutoHighlight
|
||||||
icon.source: "applications-system-symbolic"
|
icon.source: "applications-system-symbolic"
|
||||||
}
|
}
|
||||||
|
@ -172,7 +172,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: 4
|
background.radius: UkuiItems.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.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
|
||||||
import org.ukui.menu.extension 1.0
|
import org.ukui.menu.extension 1.0
|
||||||
|
@ -122,7 +123,7 @@ Item {
|
||||||
useStyleTransparent: false
|
useStyleTransparent: false
|
||||||
paletteRole: Palette.Highlight
|
paletteRole: Palette.Highlight
|
||||||
alpha: 0
|
alpha: 0
|
||||||
radius: 4
|
radius: UkuiItems.Theme.minRadius
|
||||||
borderColor: Palette.Highlight
|
borderColor: Palette.Highlight
|
||||||
border.width: activeFocus ? 2 : 0
|
border.width: activeFocus ? 2 : 0
|
||||||
|
|
||||||
|
@ -152,14 +153,14 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
AppControls2.StyleText {
|
UkuiItems.StyleText {
|
||||||
height: parent.height
|
height: parent.height
|
||||||
id: styleText
|
id: styleText
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
font.bold: parent.ListView.isCurrentItem
|
font.bold: parent.ListView.isCurrentItem
|
||||||
|
|
||||||
paletteRole: parent.ListView.isCurrentItem ? Palette.Highlight: Palette.Text
|
paletteRole: parent.ListView.isCurrentItem ? UkuiItems.Theme.Highlight: UkuiItems.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.items 1.0 as UkuiItems
|
||||||
|
|
||||||
UkuiMenuExtension {
|
UkuiMenuExtension {
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
|
@ -33,12 +34,12 @@ UkuiMenuExtension {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
|
|
||||||
AppControls2.StyleBackground {
|
UkuiItems.StyleBackground {
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
width: parent.width; height: 1
|
width: parent.width; height: 1
|
||||||
useStyleTransparent: false
|
useStyleTransparency: false
|
||||||
alpha: 0.15
|
alpha: 0.15
|
||||||
paletteRole: Palette.Text
|
paletteRole: UkuiItems.Theme.Text
|
||||||
visible: favoriteView.contentY > 0
|
visible: favoriteView.contentY > 0
|
||||||
z: 1
|
z: 1
|
||||||
}
|
}
|
||||||
|
@ -119,14 +120,14 @@ UkuiMenuExtension {
|
||||||
alpha: 0.6
|
alpha: 0.6
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
AppControls2.StyleBackground {
|
UkuiItems.StyleBackground {
|
||||||
id: icon
|
id: icon
|
||||||
height: favoriteView.itemHeight; width: height
|
height: favoriteView.itemHeight; width: height
|
||||||
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: 8
|
radius: UkuiItems.Theme.maxRadius
|
||||||
useStyleTransparent: 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