Changeset View
Changeset View
Standalone View
Standalone View
shell/package/contents/controls/TypeSelection.qml
Show First 20 Lines • Show All 48 Lines • ▼ Show 20 Line(s) | 33 | Grid { | |||
---|---|---|---|---|---|
49 | columns: horizontal ? 0 : 1 | 49 | columns: horizontal ? 0 : 1 | ||
50 | 50 | | |||
51 | spacing: 1 | 51 | spacing: 1 | ||
52 | 52 | | |||
53 | verticalItemAlignment: Grid.AlignVCenter | 53 | verticalItemAlignment: Grid.AlignVCenter | ||
54 | 54 | | |||
55 | property bool horizontal: false | 55 | property bool horizontal: false | ||
56 | 56 | | |||
57 | readonly property bool isPanel: (plasmoid.configuration.panelPosition === Latte.Types.Justify) | | |||
58 | && (plasmoid.configuration.useThemePanel) && (plasmoid.configuration.panelSize===100) | | |||
59 | && (plasmoid.configuration.zoomLevel === 0) | | |||
60 | | ||||
61 | ExclusiveGroup { | 57 | ExclusiveGroup { | ||
62 | id: dockTypeGroup | 58 | id: viewTypeGroup | ||
63 | } | 59 | } | ||
64 | 60 | | |||
65 | PlasmaComponents.Button { | 61 | PlasmaComponents.Button { | ||
66 | id: dockTypeButton | 62 | id: dockTypeButton | ||
67 | width: horizontal ? (parent.width - parent.spacing)/ 2 : parent.width | 63 | width: horizontal ? (parent.width - parent.spacing)/ 2 : parent.width | ||
68 | 64 | | |||
69 | checkable: true | 65 | checkable: true | ||
70 | checked: !typeRow.isPanel | 66 | checked: latteView.type === Latte.Types.DockView | ||
71 | text: i18nc("dock type","Dock") | 67 | text: i18nc("dock type","Dock") | ||
72 | exclusiveGroup: dockTypeGroup | 68 | exclusiveGroup: viewTypeGroup | ||
73 | tooltip: i18n("Change the behavior and appearance to Dock type") | 69 | tooltip: i18n("Change the behavior and appearance to Dock type") | ||
74 | 70 | | |||
75 | onPressedChanged: { | 71 | onPressedChanged: { | ||
76 | if (pressed && !checked) { | 72 | if (pressed && !checked) { | ||
77 | latteView.visibility.mode = Latte.Types.DodgeActive; | 73 | latteView.visibility.mode = Latte.Types.DodgeActive; | ||
78 | plasmoid.configuration.panelPosition = Latte.Types.Center; | 74 | plasmoid.configuration.panelPosition = Latte.Types.Center; | ||
79 | plasmoid.configuration.useThemePanel = true; | 75 | plasmoid.configuration.useThemePanel = true; | ||
80 | plasmoid.configuration.solidPanel = false; | 76 | plasmoid.configuration.solidPanel = false; | ||
Show All 13 Lines | |||||
94 | } | 90 | } | ||
95 | } | 91 | } | ||
96 | 92 | | |||
97 | PlasmaComponents.Button { | 93 | PlasmaComponents.Button { | ||
98 | id: panelTypeButton | 94 | id: panelTypeButton | ||
99 | width: dockTypeButton.width | 95 | width: dockTypeButton.width | ||
100 | 96 | | |||
101 | checkable: true | 97 | checkable: true | ||
102 | checked: typeRow.isPanel | 98 | checked: latteView.type === Latte.Types.PanelView | ||
103 | text: i18nc("panel type","Panel") | 99 | text: i18nc("panel type","Panel") | ||
104 | exclusiveGroup: dockTypeGroup | 100 | exclusiveGroup: viewTypeGroup | ||
105 | tooltip: i18n("Change the behavior and appearance to Panel type") | 101 | tooltip: i18n("Change the behavior and appearance to Panel type") | ||
106 | 102 | | |||
107 | onPressedChanged: { | 103 | onPressedChanged: { | ||
108 | if (pressed && !checked) { | 104 | if (pressed && !checked) { | ||
109 | latteView.visibility.mode = Latte.Types.AlwaysVisible; | 105 | latteView.visibility.mode = Latte.Types.AlwaysVisible; | ||
110 | plasmoid.configuration.panelPosition = Latte.Types.Justify; | 106 | plasmoid.configuration.panelPosition = Latte.Types.Justify; | ||
111 | plasmoid.configuration.useThemePanel = true; | 107 | plasmoid.configuration.useThemePanel = true; | ||
112 | plasmoid.configuration.solidPanel = false; | 108 | plasmoid.configuration.solidPanel = false; | ||
Show All 18 Lines |