mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-10-15 15:54:00 -04:00
deprecation notice to plugin compatibility shims - When qml-common became a thing, we left qs.Widgets shims in place for plugin compatibility - It's annoying to need to maintain them when qml-common has any change, add a warning so we can safely deprecate them in the future - One shot rename the common stuff to D to make it shorter and nicer to write
45 lines
1.0 KiB
QML
45 lines
1.0 KiB
QML
import QtQuick
|
|
import qs.Common
|
|
import qs.DCommon.Widgets
|
|
import qs.Modules.Plugins
|
|
|
|
DashCardComponent {
|
|
id: root
|
|
|
|
readonly property int count: pluginData.count ?? 0
|
|
|
|
clickable: true
|
|
|
|
function handleKeyEvent(event) {
|
|
switch (event.key) {
|
|
case Qt.Key_Left:
|
|
setData("count", Math.max(0, count - 1));
|
|
return true;
|
|
case Qt.Key_Right:
|
|
setData("count", count + 1);
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
Row {
|
|
anchors.centerIn: parent
|
|
spacing: Theme.spacingM
|
|
|
|
DIcon {
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
name: "counter_1"
|
|
size: Theme.iconSizeLarge
|
|
color: root.accentColor
|
|
}
|
|
|
|
StyledText {
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
text: root.count
|
|
font.pixelSize: Theme.fontSizeXXLarge
|
|
font.weight: Theme.fontWeightMedium
|
|
color: root.contentColor
|
|
}
|
|
}
|
|
}
|