Changeset View
Changeset View
Standalone View
Standalone View
applets/kickoff/package/contents/ui/FullRepresentation.qml
Show All 39 Lines | 32 | Item { | |||
---|---|---|---|---|---|
40 | property KickoffButton firstButton: null | 40 | property KickoffButton firstButton: null | ||
41 | property var configMenuItems | 41 | property var configMenuItems | ||
42 | 42 | | |||
43 | property QtObject globalFavorites: rootModelFavorites | 43 | property QtObject globalFavorites: rootModelFavorites | ||
44 | 44 | | |||
45 | state: "Normal" | 45 | state: "Normal" | ||
46 | focus: true | 46 | focus: true | ||
47 | 47 | | |||
48 | function switchToInitial() { | 48 | function switchToInitial() { | ||
broulik: I wonder why this should be neccessary (I know it has been there before) but CompactApplet… | |||||
doesn't seem to correctly work without. perhaps childrenInherit doesn't really work for things that are reparented later? mart: doesn't seem to correctly work without.
the weird thing is that some of the elements do appear… | |||||
49 | if(firstButton != null) { | 49 | if(firstButton != null) { | ||
50 | mainTabGroup.currentTab = firstButton.tab; | 50 | mainTabGroup.currentTab = firstButton.tab; | ||
51 | tabBar.currentTab = firstButton; | 51 | tabBar.currentTab = firstButton; | ||
52 | header.query = "" | 52 | header.query = "" | ||
53 | header.state = "hint"; | 53 | header.state = "hint"; | ||
54 | root.state = "Normal"; | 54 | root.state = "Normal"; | ||
55 | } | 55 | } | ||
56 | } | 56 | } | ||
▲ Show 20 Lines • Show All 109 Lines • ▼ Show 20 Line(s) | 164 | PlasmaExtras.ConditionalLoader { | |||
166 | when: root.state == "Search" | 166 | when: root.state == "Search" | ||
167 | //when: mainTabGroup.currentTab == searchPage || root.state == "Search" | 167 | //when: mainTabGroup.currentTab == searchPage || root.state == "Search" | ||
168 | source: Qt.resolvedUrl("SearchView.qml") | 168 | source: Qt.resolvedUrl("SearchView.qml") | ||
169 | } | 169 | } | ||
170 | 170 | | |||
171 | state: { | 171 | state: { | ||
172 | switch (plasmoid.location) { | 172 | switch (plasmoid.location) { | ||
173 | case PlasmaCore.Types.LeftEdge: | 173 | case PlasmaCore.Types.LeftEdge: | ||
174 | return "left"; | 174 | return LayoutMirroring.enabled ? "right" : "left"; | ||
broulik: Perhaps better check whether LayoutMirroring.enabled | |||||
mart: ha! actually it's never enabled, investigating more | |||||
175 | case PlasmaCore.Types.TopEdge: | 175 | case PlasmaCore.Types.TopEdge: | ||
176 | return "top"; | 176 | return "top"; | ||
177 | case PlasmaCore.Types.RightEdge: | 177 | case PlasmaCore.Types.RightEdge: | ||
178 | return "right"; | 178 | return LayoutMirroring.enabled ? "left" : "right"; | ||
179 | case PlasmaCore.Types.BottomEdge: | 179 | case PlasmaCore.Types.BottomEdge: | ||
180 | default: | 180 | default: | ||
181 | return "bottom"; | 181 | return "bottom"; | ||
182 | } | 182 | } | ||
183 | } | 183 | } | ||
184 | states: [ | 184 | states: [ | ||
185 | State { | 185 | State { | ||
186 | name: "left" | 186 | name: "left" | ||
▲ Show 20 Lines • Show All 138 Lines • ▼ Show 20 Line(s) | 321 | anchors { | |||
325 | bottom: root.bottom | 325 | bottom: root.bottom | ||
326 | } | 326 | } | ||
327 | } | 327 | } | ||
328 | } | 328 | } | ||
329 | ] | 329 | ] | ||
330 | } // mainTabGroup | 330 | } // mainTabGroup | ||
331 | } | 331 | } | ||
332 | 332 | | |||
333 | | ||||
334 | PlasmaComponents.TabBar { | 333 | PlasmaComponents.TabBar { | ||
335 | id: tabBar | 334 | id: tabBar | ||
336 | LayoutMirroring.enabled: Qt.application.layoutDirection == Qt.RightToLeft | | |||
337 | LayoutMirroring.childrenInherit: true | | |||
338 | 335 | | |||
339 | width: { | 336 | width: { | ||
340 | if (!visible) { | 337 | if (!visible) { | ||
341 | return 0; | 338 | return 0; | ||
342 | } | 339 | } | ||
343 | 340 | | |||
344 | switch (plasmoid.location) { | 341 | switch (plasmoid.location) { | ||
345 | case PlasmaCore.Types.LeftEdge: | 342 | case PlasmaCore.Types.LeftEdge: | ||
▲ Show 20 Lines • Show All 253 Lines • Show Last 20 Lines |
I wonder why this should be neccessary (I know it has been there before) but CompactApplet, DefaultCompactRepresentation and virtually all other places add this to the Dialog that holds the applet, so it should just work?