Changeset View
Changeset View
Standalone View
Standalone View
toolboxes/desktoptoolbox/contents/ui/ToolBoxRoot.qml
Show First 20 Lines • Show All 134 Lines • ▼ Show 20 Line(s) | 132 | Timer { | |||
---|---|---|---|---|---|
135 | onTriggered: main.dialogWasVisible = dialog.visible | 135 | onTriggered: main.dialogWasVisible = dialog.visible | ||
136 | } | 136 | } | ||
137 | } | 137 | } | ||
138 | onVisibleChanged: visibleTimer.restart(); | 138 | onVisibleChanged: visibleTimer.restart(); | ||
139 | } | 139 | } | ||
140 | } | 140 | } | ||
141 | 141 | | |||
142 | function placeToolBox(ts) { | 142 | function placeToolBox(ts) { | ||
143 | // if nothing has been setup yet, determin default position based on layout direction | ||||
cfeck: 'determine' | |||||
144 | if (!ts) { | ||||
145 | if (Qt.application.layoutDirection === Qt.RightToLeft) { | ||||
146 | placeToolBox("topleft"); | ||||
147 | } else { | ||||
148 | placeToolBox("topright"); | ||||
149 | } | ||||
150 | return; | ||||
151 | } | ||||
152 | | ||||
143 | var tx = Plasmoid.configuration.ToolBoxButtonX | 153 | var tx = Plasmoid.configuration.ToolBoxButtonX | ||
144 | var ty = Plasmoid.configuration.ToolBoxButtonY | 154 | var ty = Plasmoid.configuration.ToolBoxButtonY | ||
145 | var pos; | 155 | var pos; | ||
146 | 156 | | |||
147 | switch (ts) { | 157 | switch (ts) { | ||
148 | case "top": | 158 | case "top": | ||
149 | ty = main.y; | 159 | ty = main.y; | ||
150 | pos = plasmoid.adjustToAvailableScreenRegion(tx, ty, toolBoxButton.width, toolBoxButton.height); | 160 | pos = plasmoid.adjustToAvailableScreenRegion(tx, ty, toolBoxButton.width, toolBoxButton.height); | ||
▲ Show 20 Lines • Show All 41 Lines • Show Last 20 Lines |
'determine'