Files
DankMaterialShell/quickshell/Modules/ControlCenter/Widgets/PluginTile.qml
T
bbedward 014c69b09a settings: tile color restyle and re-org, use materials own shift for
them towards theme
controlCenter: make a real grid, add numerous more tile varieties, add
icon size option
surfaces: fix elevation levels in general, and shift them down
settings: restyles and re-org
sliders: scale down universally
2026-09-18 14:32:55 -04:00

40 lines
1.3 KiB
QML

import QtQuick
import qs.Common
import qs.Services
CcTile {
id: root
readonly property string widgetId: widgetData.id || ""
readonly property bool isBuiltin: widgetId.startsWith("builtin_")
readonly property string pluginId: isBuiltin ? "" : widgetId.replace("plugin_", "")
readonly property var instance: isBuiltin ? (host?.model?.builtinInstances[widgetId] ?? null) : pluginHost.instance
readonly property bool hasDetail: (instance?.ccDetailContent ?? null) !== null
iconName: instance?.ccWidgetIcon || widgetDef?.icon || "extension"
title: instance?.ccWidgetPrimaryText || widgetDef?.text || I18n.tr("Plugin")
subtitle: instance?.ccWidgetSecondaryText || ""
active: instance?.ccWidgetIsActive ?? false
toggle: instance?.ccWidgetIsToggle ?? true
showExpand: hasDetail
opensPage: (!toggle || compact) && hasDetail
expandedContent: instance?.ccExpandedContent ?? null
expandedMinimumHeight: instance?.ccExpandedMinimumHeight ?? Theme.listItemHeight
enabled: instance !== null
onClicked: {
if ((compact || !toggle) && hasDetail) {
expandClicked();
return;
}
instance?.ccWidgetToggled();
}
onExpandClicked: instance?.ccWidgetExpanded()
PluginInstanceHost {
id: pluginHost
pluginId: root.pluginId
}
}