diff --git a/qml/AppControls2/LabelItem.qml b/qml/AppControls2/LabelItem.qml index 436bddb..0bd7d5c 100644 --- a/qml/AppControls2/LabelItem.qml +++ b/qml/AppControls2/LabelItem.qml @@ -5,7 +5,7 @@ import QtQuick.Controls 2.5 MouseArea { id: control hoverEnabled: true - ToolTip.text: qsTr("Open the label selection interface") + ToolTip.text: comment ToolTip.visible: control.containsMouse states: State { when: control.activeFocus diff --git a/qml/AppUI/AppList.qml b/qml/AppUI/AppList.qml index eac31e0..2007194 100644 --- a/qml/AppUI/AppList.qml +++ b/qml/AppUI/AppList.qml @@ -64,6 +64,7 @@ Item { property string id: model.id property string name: model.name property string icon: model.icon + property string comment: model.comment // label tooltip property int toTop: model.top property bool recentInstall: model.recentInstall sourceComponent: { diff --git a/qml/AppUI/AppPageHeader.qml b/qml/AppUI/AppPageHeader.qml index 16567f1..ad2dda4 100644 --- a/qml/AppUI/AppPageHeader.qml +++ b/qml/AppUI/AppPageHeader.qml @@ -196,8 +196,11 @@ Item { model: appPageHeaderUtils.model(PluginGroup.Button) delegate: AppControls2.RoundButton { - width: height; height: ListView.view ? ListView.view.height : 0 + width: height + height: ListView.view ? ListView.view.height : 0 buttonIcon: model.icon + ToolTip.text: qsTr("Search App") + ToolTip.visible: containsMouse onClicked: { root.state = "search"; // 后续添加需求,可以用model数据设置 diff --git a/qml/AppUI/FullScreenContent.qml b/qml/AppUI/FullScreenContent.qml index 1942c33..980a4c4 100644 --- a/qml/AppUI/FullScreenContent.qml +++ b/qml/AppUI/FullScreenContent.qml @@ -224,7 +224,8 @@ RowLayout { hoverEnabled: true width: 170; height: width acceptedButtons: Qt.LeftButton | Qt.RightButton - + ToolTip.text: name + ToolTip.visible: iconText.truncated && containsMouse AppControls2.StyleBackground { anchors.fill: parent useStyleTransparent: false @@ -323,7 +324,8 @@ RowLayout { hoverEnabled: true width: 170; height: width acceptedButtons: Qt.LeftButton | Qt.RightButton - + ToolTip.text: name + ToolTip.visible: folderText.truncated && containsMouse AppControls2.StyleBackground { anchors.fill: parent useStyleTransparent: false @@ -350,8 +352,8 @@ RowLayout { AppControls2.FolderIcon { id: folderIcon - width: 96 - height: 96 + width: 86 + height: 86 rows: 4; columns: 4 spacing: 2; padding: 8 icons: icon @@ -361,6 +363,7 @@ RowLayout { } AppControls2.StyleText { + id: folderText anchors.bottom: parent.bottom anchors.bottomMargin: 20 width: parent.width @@ -465,6 +468,7 @@ RowLayout { height: GridView.view.cellHeight MouseArea { + id: labelAppsMouseArea anchors.centerIn: parent hoverEnabled: true width: 170; height: width @@ -483,6 +487,8 @@ RowLayout { appIcon: modelData.icon spacing: 8 textHighLight: true + ToolTip.text: modelData.name + ToolTip.visible: textTruncated && labelAppsMouseArea.containsMouse } } diff --git a/qml/AppUI/FullScreenHeader.qml b/qml/AppUI/FullScreenHeader.qml index ed2b769..9cd82e2 100644 --- a/qml/AppUI/FullScreenHeader.qml +++ b/qml/AppUI/FullScreenHeader.qml @@ -59,6 +59,8 @@ Item { id: buttonMouseArea hoverEnabled: true anchors.fill: parent + ToolTip.text: qsTr("Contract") + ToolTip.visible: containsMouse onClicked: mainWindow.exitFullScreen() activeFocusOnTab: true Keys.onPressed: { diff --git a/qml/AppUI/PluginSelectMenu.qml b/qml/AppUI/PluginSelectMenu.qml index 01cdfec..cd3628d 100644 --- a/qml/AppUI/PluginSelectMenu.qml +++ b/qml/AppUI/PluginSelectMenu.qml @@ -40,6 +40,8 @@ RowLayout { Layout.fillWidth: true Layout.maximumWidth: height activeFocusOnTab: true + ToolTip.text: qsTr("Switch Sort Type") + ToolTip.visible: containsMouse highlight: mainWindow.isFullScreen autoHighLight: !mainWindow.isFullScreen @@ -62,6 +64,9 @@ RowLayout { Layout.fillHeight: true Layout.maximumWidth: 16 Layout.maximumHeight: 16 + ToolTip.text: qsTr("Sort Type Options") + ToolTip.visible: containsMouse + hoverEnabled: true activeFocusOnTab: true Keys.onPressed: { diff --git a/qml/AppUI/Sidebar.qml b/qml/AppUI/Sidebar.qml index b017a68..54ea1f0 100644 --- a/qml/AppUI/Sidebar.qml +++ b/qml/AppUI/Sidebar.qml @@ -76,6 +76,9 @@ Item { id: buttonMouseArea hoverEnabled: true anchors.fill: parent + ToolTip.text: qsTr("Expand") + ToolTip.visible: containsMouse + onClicked: mainWindow.isFullScreen = true activeFocusOnTab: true Keys.onPressed: { diff --git a/qml/extensions/FavoriteExtension.qml b/qml/extensions/FavoriteExtension.qml index d1a0669..59dc316 100644 --- a/qml/extensions/FavoriteExtension.qml +++ b/qml/extensions/FavoriteExtension.qml @@ -141,6 +141,8 @@ UkuiMenuExtension { appIcon: model.icon display: Display.TextUnderIcon scale: (control.containsPress && !icon.hold) ? 1.1 : 1.0 + ToolTip.visible: textTruncated && control.containsMouse + ToolTip.text: model.name Behavior on scale { NumberAnimation { duration: 300; easing.type: Easing.InOutCubic } diff --git a/src/appdata/plugin/app-category-plugin.cpp b/src/appdata/plugin/app-category-plugin.cpp index 62c4183..24adee3 100644 --- a/src/appdata/plugin/app-category-plugin.cpp +++ b/src/appdata/plugin/app-category-plugin.cpp @@ -201,6 +201,7 @@ void AppCategoryPlugin::generateData(QVector &data) } DataEntity label; + label.setComment(tr("Open Function Sort Menu")); label.setType(DataType::Label); label.setId(item.label.id()); label.setName(item.label.displayName()); diff --git a/src/appdata/plugin/app-letter-sort-plugin.cpp b/src/appdata/plugin/app-letter-sort-plugin.cpp index 167b751..c158a25 100644 --- a/src/appdata/plugin/app-letter-sort-plugin.cpp +++ b/src/appdata/plugin/app-letter-sort-plugin.cpp @@ -162,7 +162,7 @@ void AppLetterSortPlugin::addAppToLabel(const QString &labelName, QVector