Changeset View
Changeset View
Standalone View
Standalone View
applets/systemtray/package/contents/ui/main.qml
Show All 35 Lines | 29 | MouseArea { | |||
---|---|---|---|---|---|
36 | Layout.preferredHeight: Layout.minimumHeight | 36 | Layout.preferredHeight: Layout.minimumHeight | ||
37 | LayoutMirroring.enabled: !vertical && Qt.application.layoutDirection === Qt.RightToLeft | 37 | LayoutMirroring.enabled: !vertical && Qt.application.layoutDirection === Qt.RightToLeft | ||
38 | LayoutMirroring.childrenInherit: true | 38 | LayoutMirroring.childrenInherit: true | ||
39 | 39 | | |||
40 | property var iconSizes: ["small", "smallMedium", "medium", "large", "huge", "enormous"]; | 40 | property var iconSizes: ["small", "smallMedium", "medium", "large", "huge", "enormous"]; | ||
41 | property int iconSize: plasmoid.configuration.iconSize + (Kirigami.Settings.tabletMode ? 1 : 0) | 41 | property int iconSize: plasmoid.configuration.iconSize + (Kirigami.Settings.tabletMode ? 1 : 0) | ||
42 | 42 | | |||
43 | property bool vertical: plasmoid.formFactor === PlasmaCore.Types.Vertical | 43 | property bool vertical: plasmoid.formFactor === PlasmaCore.Types.Vertical | ||
44 | readonly property int itemSize: units.roundToIconSize(Math.min(Math.min(width, height), units.iconSizes[iconSizes[Math.min(iconSizes.length-1, iconSize)]])) | 44 | readonly property int baseSize: units.roundToIconSize(Math.min(Math.min(width, height), units.iconSizes[iconSizes[Math.min(iconSizes.length-1, iconSize)]])) | ||
45 | readonly property int itemSize: { | ||||
46 | if (Kirigami.Settings.tabletMode) { | ||||
47 | // Set the tray items' clickable areas on the panel to be bigger than normal to allow for easier touchability | ||||
48 | return baseSize + units.smallSpacing; | ||||
49 | } else { | ||||
50 | return baseSize + Math.round(units.smallSpacing/2); | ||||
51 | } | ||||
52 | } | ||||
45 | property int hiddenItemSize: units.iconSizes.smallMedium | 53 | property int hiddenItemSize: units.iconSizes.smallMedium | ||
46 | property alias expanded: dialog.visible | 54 | property alias expanded: dialog.visible | ||
47 | property Item activeApplet | 55 | property Item activeApplet | ||
48 | property int status: dialog.visible ? PlasmaCore.Types.RequiresAttentionStatus : PlasmaCore.Types.PassiveStatus | 56 | property int status: dialog.visible ? PlasmaCore.Types.RequiresAttentionStatus : PlasmaCore.Types.PassiveStatus | ||
49 | 57 | | |||
50 | property alias visibleLayout: tasksRow | 58 | property alias visibleLayout: tasksRow | ||
51 | property alias hiddenLayout: expandedRepresentation.hiddenLayout | 59 | property alias hiddenLayout: expandedRepresentation.hiddenLayout | ||
52 | 60 | | |||
▲ Show 20 Lines • Show All 309 Lines • Show Last 20 Lines |