fix: 使用AppletItem和AppletItemButton适配任务栏尺寸
This commit is contained in:
+17
-17
@@ -4,35 +4,35 @@
|
|||||||
|
|
||||||
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
|
||||||
|
|
||||||
Rectangle {
|
AppletItemButton {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
color: "#3498db"
|
|
||||||
radius: 8
|
|
||||||
|
|
||||||
Text {
|
Rectangle {
|
||||||
anchors.centerIn: parent
|
anchors.fill: parent
|
||||||
text: "GPU"
|
color: "#3498db"
|
||||||
font.pixelSize: 14
|
radius: 8
|
||||||
color: "white"
|
|
||||||
|
Text {
|
||||||
|
anchors.centerIn: parent
|
||||||
|
text: "GPU"
|
||||||
|
font.pixelSize: 12
|
||||||
|
color: "white"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MouseArea {
|
onClicked: {
|
||||||
anchors.fill: parent
|
popup.visible = !popup.visible
|
||||||
onClicked: {
|
|
||||||
popup.visible = !popup.visible
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user