fix: 使用AppletItem和AppletItemButton适配任务栏尺寸
This commit is contained in:
@@ -4,18 +4,20 @@
|
|||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick 2.15
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls 2.15
|
||||||
import QtQuick.Layouts 1.15
|
|
||||||
import org.deepin.ds 1.0
|
import org.deepin.ds 1.0
|
||||||
|
|
||||||
ContainmentItem {
|
AppletItem {
|
||||||
id: root
|
id: root
|
||||||
objectName: "graphics driver applet"
|
objectName: "graphics driver applet"
|
||||||
implicitWidth: 56
|
implicitWidth: Panel.rootObject.dockItemMaxSize
|
||||||
implicitHeight: 56
|
implicitHeight: Panel.rootObject.dockItemMaxSize
|
||||||
property int dockOrder: 20
|
property int dockOrder: 20
|
||||||
|
|
||||||
property var applet: Applet
|
property var applet: Applet
|
||||||
|
|
||||||
|
AppletItemButton {
|
||||||
|
anchors.fill: parent
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
color: "#3498db"
|
color: "#3498db"
|
||||||
@@ -24,17 +26,15 @@ ContainmentItem {
|
|||||||
Text {
|
Text {
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
text: "GPU"
|
text: "GPU"
|
||||||
font.pixelSize: 14
|
font.pixelSize: 12
|
||||||
color: "white"
|
color: "white"
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
MouseArea {
|
|
||||||
anchors.fill: parent
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
popup.visible = !popup.visible
|
popup.visible = !popup.visible
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
Popup {
|
Popup {
|
||||||
id: popup
|
id: popup
|
||||||
|
|||||||
Reference in New Issue
Block a user