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