diff --git a/qml/AppControls2/AppItem.qml b/qml/AppControls2/AppItem.qml index 24f4771..4284e6e 100644 --- a/qml/AppControls2/AppItem.qml +++ b/qml/AppControls2/AppItem.qml @@ -19,7 +19,7 @@ MouseArea { UkuiItems.StyleBackground { id: controlBase anchors.fill: parent - radius: 4 + radius: UkuiItems.Theme.minRadius useStyleTransparency: false paletteRole: UkuiItems.Theme.Text alpha: isSelect ? 1.00 : control.containsPress ? 0.16 : control.containsMouse ? 0.08 : 0.00 diff --git a/qml/AppControls2/FolderItem.qml b/qml/AppControls2/FolderItem.qml index 200ae66..224a051 100644 --- a/qml/AppControls2/FolderItem.qml +++ b/qml/AppControls2/FolderItem.qml @@ -1,8 +1,8 @@ import QtQuick 2.12 import QtQuick.Layouts 1.12 import QtQuick.Controls 2.5 -import AppControls2 1.0 as AppControls2 import org.ukui.menu.core 1.0 +import org.ukui.quick.items 1.0 as UkuiItems MouseArea { id: control @@ -42,7 +42,7 @@ MouseArea { StyleBackground { id: controlBase anchors.fill: parent - radius: 4 + radius: UkuiItems.Theme.minRadius useStyleTransparent: false alpha: isSelect ? 0.55 : control.containsPress ? 0.82 : control.containsMouse ? 0.55 : 0.00 @@ -55,7 +55,7 @@ MouseArea { rows: 2; columns: 2 spacing: 2; padding: 2 icons: icon - alpha: 0.12; radius: 4 + alpha: 0.12; radius: UkuiItems.Theme.minRadius Layout.alignment: Qt.AlignVCenter Layout.preferredWidth: 32 Layout.preferredHeight: 32 @@ -82,14 +82,14 @@ MouseArea { Component { id: editText - AppControls2.StyleBackground { - radius: 6 - useStyleTransparent: false + UkuiItems.StyleBackground { + radius: UkuiItems.Theme.normalRadius + useStyleTransparency: false alpha: textChange.activeFocus ? 0.04 : 0 - paletteRole: Palette.Text + paletteRole: UkuiItems.Theme.Text border.width: 2 borderAlpha: textChange.activeFocus ? 1 : 0 - borderColor: Palette.Highlight + borderColor: UkuiItems.Theme.Highlight TextInput { id: textChange diff --git a/qml/AppControls2/LabelItem.qml b/qml/AppControls2/LabelItem.qml index 3122277..2e1fae3 100644 --- a/qml/AppControls2/LabelItem.qml +++ b/qml/AppControls2/LabelItem.qml @@ -2,6 +2,7 @@ import QtQuick 2.0 import QtQuick.Layouts 1.12 import QtQuick.Controls 2.5 import org.ukui.menu.core 1.0 +import org.ukui.quick.items 1.0 as UkuiItems MouseArea { id: control @@ -35,7 +36,7 @@ MouseArea { StyleBackground { id: controlBase anchors.fill: parent - radius: 4 + radius: UkuiItems.Theme.minRadius useStyleTransparent: false alpha: control.containsPress ? 0.82 : control.containsMouse ? 0.55 : 0.00 diff --git a/qml/AppUI/AppListView.qml b/qml/AppUI/AppListView.qml index 49bda09..cdf8742 100644 --- a/qml/AppUI/AppListView.qml +++ b/qml/AppUI/AppListView.qml @@ -20,6 +20,7 @@ import QtQuick 2.12 import QtQuick.Controls 2.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 MouseArea { @@ -33,6 +34,16 @@ MouseArea { hoverEnabled: 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 { anchors.fill: parent spacing: 0 diff --git a/qml/AppUI/AppPageSearch.qml b/qml/AppUI/AppPageSearch.qml index 4f61ea0..b7daa42 100644 --- a/qml/AppUI/AppPageSearch.qml +++ b/qml/AppUI/AppPageSearch.qml @@ -1,7 +1,7 @@ import QtQuick 2.12 import QtQuick.Controls 2.5 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 Item { @@ -15,7 +15,7 @@ Item { anchors.fill: parent anchors.leftMargin: 16 anchors.rightMargin: 16 - radius: 6 //change theme + radius: UkuiItems.Theme.normalRadius changeFocusTarget: focusToPageContent visible: true onTextChanged: { diff --git a/qml/AppUI/EditText.qml b/qml/AppUI/EditText.qml index 8fa96c5..5ea543d 100644 --- a/qml/AppUI/EditText.qml +++ b/qml/AppUI/EditText.qml @@ -19,8 +19,8 @@ import QtQuick 2.12 import QtQuick.Layouts 1.12 import QtQuick.Controls 2.5 -import AppControls2 1.0 as AppControls2 import org.ukui.menu.core 1.0 +import org.ukui.quick.items 1.0 as UkuiItems Item { id: contain @@ -32,13 +32,13 @@ Item { Component { id: unEditText - AppControls2.StyleText { + UkuiItems.StyleText { id: textShow verticalAlignment: Text.AlignVCenter horizontalAlignment: contain.textCenterIn ? Text.AlignHCenter : Text.AlignLeft elide: Text.ElideRight text: contain.textEdited - paletteRole: isFullScreenFolder ? Palette.HighlightedText : Palette.Text + paletteRole: isFullScreenFolder ? UkuiItems.Theme.HighlightedText : UkuiItems.Theme.Text font.bold: !isFullScreenFolder font.pointSize: isFullScreenFolder ? textUltra : systemFontSize @@ -55,14 +55,14 @@ Item { Component { id: editText - AppControls2.StyleBackground { - radius: 6 - useStyleTransparent: false + UkuiItems.StyleBackground { + radius: UkuiItems.Theme.normalRadius + useStyleTransparency: false alpha: textEdit.activeFocus ? 0.04 : 0 - paletteRole: Palette.Text + paletteRole: UkuiItems.Theme.Text border.width: 2 borderAlpha: textEdit.activeFocus ? 1 : 0 - borderColor: Palette.Highlight + borderColor: UkuiItems.Theme.Highlight TextInput { id: textEdit diff --git a/qml/AppUI/FullScreenContent.qml b/qml/AppUI/FullScreenContent.qml index cbf3ff8..fd84ad1 100644 --- a/qml/AppUI/FullScreenContent.qml +++ b/qml/AppUI/FullScreenContent.qml @@ -22,6 +22,7 @@ import QtQml.Models 2.12 import QtQuick.Controls 2.5 import org.ukui.menu.core 1.0 import AppControls2 1.0 as AppControls2 +import org.ukui.quick.items 1.0 as UkuiItems RowLayout { id: root @@ -86,14 +87,14 @@ RowLayout { interactive: contentHeight > parent.height highlightMoveDuration: animationDuration - highlight: AppControls2.StyleBackground { + highlight: UkuiItems.StyleBackground { width: labelListView.maxLabelWidth; height: 30 - radius: 4 - useStyleTransparent: false - paletteRole: Palette.Light + radius: UkuiItems.Theme.minRadius + useStyleTransparency: false + paletteRole: UkuiItems.Theme.Light border.width: 1 alpha: 0.18; borderAlpha: 0.7 - borderColor: Palette.HighlightedText + borderColor: UkuiItems.Theme.HighlightedText } onCountChanged: currentIndex = 0 @@ -119,9 +120,9 @@ RowLayout { width: labelListView.maxLabelWidth height: 30 hoverEnabled: true - AppControls2.StyleText { + UkuiItems.StyleText { anchors.fill: parent - paletteRole: Palette.HighlightedText + paletteRole: UkuiItems.Theme.HighlightedText elide: Text.ElideRight horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter @@ -477,20 +478,20 @@ RowLayout { anchors.fill: parent anchors.leftMargin: 67 spacing: 15 - AppControls2.StyleText { + UkuiItems.StyleText { id: labelName anchors.verticalCenter: parent.verticalCenter verticalAlignment: Text.AlignVCenter width: contentWidth text: name - paletteRole: Palette.HighlightedText + paletteRole: UkuiItems.Theme.HighlightedText } - AppControls2.StyleBackground { + UkuiItems.StyleBackground { anchors.verticalCenter: parent.verticalCenter - useStyleTransparent: false + useStyleTransparency: false alpha: 0.14 - paletteRole: Palette.Light + paletteRole: UkuiItems.Theme.Light height: 1 width: parent.width - labelName.width - parent.spacing } @@ -509,11 +510,11 @@ RowLayout { width: 170; height: width acceptedButtons: Qt.LeftButton | Qt.RightButton - AppControls2.StyleBackground { + UkuiItems.StyleBackground { anchors.fill: parent - useStyleTransparent: false - paletteRole: Palette.Light - radius: 16 + useStyleTransparency: false + paletteRole: UkuiItems.Theme.Light + radius: UkuiItems.Theme.maxRadius alpha: parent.containsPress ? 0.25 : parent.containsMouse ? 0.15 : 0.00 AppControls2.IconLabel { anchors.fill: parent @@ -552,7 +553,9 @@ RowLayout { labelListView.currentIndex = labelRepeater.count - 1 return } - labelListView.currentIndex = labelColumn.childAt(contentX, contentY + 200).labelIndex + if (labelColumn.childAt(contentX,contentY) !== null) { + labelListView.currentIndex = labelColumn.childAt(contentX,contentY).labelIndex + } } NumberAnimation { @@ -615,17 +618,17 @@ RowLayout { NumberAnimation { duration: 200; easing.type: Easing.InOutQuad } } - background: AppControls2.StyleBackground { - useStyleTransparent: false - paletteRole: Palette.Dark + background: UkuiItems.StyleBackground { + useStyleTransparency: false + paletteRole: UkuiItems.Theme.Dark alpha: 0.25 radius: width / 2 } - contentItem: AppControls2.StyleBackground { + contentItem: UkuiItems.StyleBackground { radius: width / 2 - useStyleTransparent: false - paletteRole: Palette.Light + useStyleTransparency: false + paletteRole: UkuiItems.Theme.Light alpha: fullScreenScrollBar.pressed ? 0.90 : fullScreenScrollBar.hovered ? 0.78 : 0.60 } } diff --git a/qml/AppUI/FullScreenFolder.qml b/qml/AppUI/FullScreenFolder.qml index a6faa27..a079d6a 100644 --- a/qml/AppUI/FullScreenFolder.qml +++ b/qml/AppUI/FullScreenFolder.qml @@ -21,7 +21,7 @@ import QtQml.Models 2.12 import QtQuick.Layouts 1.12 import QtQuick.Controls 2.5 import org.ukui.menu.core 1.0 -import AppControls2 1.0 as AppControls2 +import org.ukui.quick.items 1.0 as UkuiItems Loader { @@ -54,10 +54,10 @@ Loader { Component { id: folderComponent Item { - AppControls2.StyleBackground { + UkuiItems.StyleBackground { id: folderIconBase - paletteRole: Palette.Text - useStyleTransparent: false + paletteRole: UkuiItems.Theme.Text + useStyleTransparency: false property int folderIconSize: 0 property int iconSpacing: 0 property int imageX: 0 @@ -73,7 +73,7 @@ Loader { target: folderIconBase width: 720 height: viewMaxRow * 170 + margins * 2 - radius: 36 + radius: UkuiItems.Theme.maxRadius gridViewMargin: margins x: (parent.width - width) / 2 y: (parent.height - height) / 2 @@ -91,7 +91,7 @@ Loader { target: folderIconBase width: 86 height: 86 - radius: 16 + radius: UkuiItems.Theme.maxRadius gridViewMargin: 8 x: root.mapFromGlobal(folderX, 0).x y: root.mapFromGlobal(0, folderY).y @@ -247,11 +247,11 @@ Loader { width: GridView.view.cellWidth; height: GridView.view.cellHeight acceptedButtons: Qt.LeftButton | Qt.RightButton - AppControls2.StyleBackground { + UkuiItems.StyleBackground { anchors.fill: parent - useStyleTransparent: false - paletteRole: Palette.Light - radius: 16 + useStyleTransparency: false + paletteRole: UkuiItems.Theme.Light + radius: UkuiItems.Theme.maxRadius alpha: parent.containsPress ? 0.25 : parent.containsMouse ? 0.15 : 0.00 Image { @@ -261,7 +261,7 @@ Loader { x: folderIconBase.imageX; y: folderIconBase.imageY } - AppControls2.StyleText { + UkuiItems.StyleText { width: parent.width horizontalAlignment: Text.AlignHCenter anchors.top: iconImage.bottom @@ -269,7 +269,7 @@ Loader { anchors.horizontalCenter: parent.horizontalCenter text: name elide: Text.ElideRight - paletteRole: Palette.HighlightedText + paletteRole: UkuiItems.Theme.HighlightedText } } onClicked: { diff --git a/qml/AppUI/FullScreenFooter.qml b/qml/AppUI/FullScreenFooter.qml index 962753b..cda7ea2 100644 --- a/qml/AppUI/FullScreenFooter.qml +++ b/qml/AppUI/FullScreenFooter.qml @@ -20,7 +20,7 @@ import QtQuick 2.12 import QtQuick.Layouts 1.12 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.utils 1.0 @@ -29,13 +29,13 @@ Row { Layout.preferredHeight: 48 layoutDirection: Qt.RightToLeft - AppControls2.StyleBackground { + UkuiItems.StyleBackground { width: 48; height: width - useStyleTransparent: false - paletteRole: Palette.Light + useStyleTransparency: false + paletteRole: UkuiItems.Theme.Light alpha: powerButtonArea.containsPress ? 0.25 : powerButtonArea.containsMouse ? 0.12 : 0 radius: height / 2 - borderColor: Palette.Highlight + borderColor: UkuiItems.Theme.Highlight border.width: powerButtonArea.activeFocus ? 2 : 0 PowerButton { diff --git a/qml/AppUI/FullScreenHeader.qml b/qml/AppUI/FullScreenHeader.qml index 566f5bc..362456d 100644 --- a/qml/AppUI/FullScreenHeader.qml +++ b/qml/AppUI/FullScreenHeader.qml @@ -1,7 +1,7 @@ import QtQuick 2.12 import QtQuick.Layouts 1.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.utils 1.0 @@ -22,12 +22,12 @@ Item { id: searchInputBar width: 372; height: 36 anchors.centerIn: parent - radius: 4 //change theme + radius: UkuiItems.Theme.minRadius visible: opacity onTextChanged: { if (text === "") { - pluginSelectButton.model.reactivateProvider(); + appPageHeaderUtils.model(PluginGroup.SortMenuItem).reactivateProvider(); } else { appPageHeaderUtils.model(PluginGroup.Button).reactivateProvider(); appPageHeaderUtils.startSearch(text); @@ -38,15 +38,15 @@ Item { } } - AppControls2.StyleBackground { + UkuiItems.StyleBackground { width: 48; height: width - radius: 4 - useStyleTransparent: false - paletteRole: Palette.Light + radius: UkuiItems.Theme.minRadius + useStyleTransparency: false + paletteRole: UkuiItems.Theme.Light alpha: buttonMouseArea.containsPress ? 0.30 : buttonMouseArea.containsMouse ? 0.20 : 0.00 anchors.right: parent.right anchors.verticalCenter: parent.verticalCenter - borderColor: Palette.Highlight + borderColor: UkuiItems.Theme.Highlight border.width: buttonMouseArea.activeFocus ? 2 : 0 ThemeIcon { diff --git a/qml/AppUI/FullScreenUI.qml b/qml/AppUI/FullScreenUI.qml index 1a9abf5..814b046 100644 --- a/qml/AppUI/FullScreenUI.qml +++ b/qml/AppUI/FullScreenUI.qml @@ -1,10 +1,10 @@ import QtQuick 2.0 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 -AppControls2.StyleBackground { - paletteRole: Palette.Dark +UkuiItems.StyleBackground { + paletteRole: UkuiItems.Theme.Dark MouseArea { anchors.fill: parent onClicked: { diff --git a/qml/AppUI/NormalUI.qml b/qml/AppUI/NormalUI.qml index e5595d5..1781c8a 100644 --- a/qml/AppUI/NormalUI.qml +++ b/qml/AppUI/NormalUI.qml @@ -1,6 +1,5 @@ import QtQuick 2.12 import org.ukui.menu.core 1.0 - import org.ukui.quick.items 1.0 as UkuiItems FocusScope { diff --git a/qml/AppUI/PluginSelectButton.qml b/qml/AppUI/PluginSelectButton.qml index bd09a5a..ec1ad8a 100644 --- a/qml/AppUI/PluginSelectButton.qml +++ b/qml/AppUI/PluginSelectButton.qml @@ -20,7 +20,6 @@ import QtQuick 2.12 import QtQuick.Layouts 1.12 import QtQuick.Controls 2.12 -import AppControls2 1.0 as AppControls2 import org.ukui.menu.core 1.0 import org.ukui.menu.utils 1.0 import org.ukui.quick.items 1.0 as UkuiItems diff --git a/qml/AppUI/SelectionPage.qml b/qml/AppUI/SelectionPage.qml index 41b3a9a..79986f5 100644 --- a/qml/AppUI/SelectionPage.qml +++ b/qml/AppUI/SelectionPage.qml @@ -19,7 +19,7 @@ import QtQuick 2.12 import QtQuick.Layouts 1.2 import org.ukui.menu.core 1.0 -import AppControls2 1.0 as AppControls2 +import org.ukui.quick.items 1.0 as UkuiItems Item { id: root @@ -173,7 +173,7 @@ Item { ] model: modelManager.getLabelModel() - delegate: AppControls2.StyleBackground { + delegate: UkuiItems.StyleBackground { id: labelItem height: selectionArea.itemHeight; width: selectionArea.itemWidth property int index: model.index @@ -181,7 +181,7 @@ Item { property string displayName: model.displayName property string id: model.id alpha: (itemMouseArea.containsPress && !model.isDisable) ? 0.82 : (itemMouseArea.containsMouse && !model.isDisable) ? 0.55 : 0.00 - useStyleTransparent: false + useStyleTransparency: false radius: 8 focus: true Keys.onPressed: { @@ -194,11 +194,11 @@ Item { when: labelItem.activeFocus PropertyChanges { target: labelItem - borderColor: Palette.Highlight + borderColor: UkuiItems.Theme.Highlight border.width: 2 } } - AppControls2.StyleText { + UkuiItems.StyleText { anchors.fill: parent text: model.displayName alpha: model.isDisable ? 0.2 : 0.9 diff --git a/qml/AppUI/Sidebar.qml b/qml/AppUI/Sidebar.qml index 7593da4..0a77d46 100644 --- a/qml/AppUI/Sidebar.qml +++ b/qml/AppUI/Sidebar.qml @@ -54,7 +54,7 @@ Item { } } - background.radius: 4 + background.radius: UkuiItems.Theme.minRadius icon.mode: UkuiItems.Icon.AutoHighlight icon.source: "view-fullscreen-symbolic" } @@ -88,7 +88,7 @@ Item { } } - background.radius: 4 + background.radius: UkuiItems.Theme.minRadius icon.mode: UkuiItems.Icon.AutoHighlight icon.source: totalUtils.iconFile } @@ -113,7 +113,7 @@ Item { } } - background.radius: 4 + background.radius: UkuiItems.Theme.minRadius icon.mode: UkuiItems.Icon.AutoHighlight icon.source: "computer-symbolic" } @@ -138,7 +138,7 @@ Item { } } - background.radius: 4 + background.radius: UkuiItems.Theme.minRadius icon.mode: UkuiItems.Icon.AutoHighlight icon.source: "applications-system-symbolic" } @@ -172,7 +172,7 @@ Item { 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.source: powerButtonBase.icon } diff --git a/qml/AppUI/WidgetPage.qml b/qml/AppUI/WidgetPage.qml index c41d31a..c10c019 100644 --- a/qml/AppUI/WidgetPage.qml +++ b/qml/AppUI/WidgetPage.qml @@ -22,6 +22,7 @@ import QtQuick.Layouts 1.12 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.utils 1.0 import org.ukui.menu.extension 1.0 @@ -122,7 +123,7 @@ Item { useStyleTransparent: false paletteRole: Palette.Highlight alpha: 0 - radius: 4 + radius: UkuiItems.Theme.minRadius borderColor: Palette.Highlight border.width: activeFocus ? 2 : 0 @@ -152,14 +153,14 @@ Item { } } - AppControls2.StyleText { + UkuiItems.StyleText { height: parent.height id: styleText verticalAlignment: Text.AlignVCenter horizontalAlignment: Text.AlignHCenter 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 } diff --git a/qml/extensions/FavoriteExtension.qml b/qml/extensions/FavoriteExtension.qml index 0b56e5d..9a94aa1 100644 --- a/qml/extensions/FavoriteExtension.qml +++ b/qml/extensions/FavoriteExtension.qml @@ -22,6 +22,7 @@ import QtQuick.Controls 2.5 import org.ukui.menu.core 1.0 import org.ukui.menu.extension 1.0 import AppControls2 1.0 as AppControls2 +import org.ukui.quick.items 1.0 as UkuiItems UkuiMenuExtension { Component.onCompleted: { @@ -33,12 +34,12 @@ UkuiMenuExtension { anchors.fill: parent hoverEnabled: true - AppControls2.StyleBackground { + UkuiItems.StyleBackground { anchors.top: parent.top width: parent.width; height: 1 - useStyleTransparent: false + useStyleTransparency: false alpha: 0.15 - paletteRole: Palette.Text + paletteRole: UkuiItems.Theme.Text visible: favoriteView.contentY > 0 z: 1 } @@ -119,14 +120,14 @@ UkuiMenuExtension { alpha: 0.6 } } - AppControls2.StyleBackground { + UkuiItems.StyleBackground { id: icon height: favoriteView.itemHeight; width: height property bool hold: false property int visualIndex: 0 x: 0; y: 0 - radius: 8 - useStyleTransparent: false + radius: UkuiItems.Theme.maxRadius + useStyleTransparency: false scale: icon.hold ? 1.1 :1.0 alpha: control.containsPress ? 0.75 : control.containsMouse ? 0.6 : 0.40