diff --git a/package/driverview.qml b/package/driverview.qml index 44c3505..2b95f69 100644 --- a/package/driverview.qml +++ b/package/driverview.qml @@ -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 } }