Changeset View
Changeset View
Standalone View
Standalone View
applets/systemtray/package/contents/ui/main.qml
Show First 20 Lines • Show All 301 Lines • ▼ Show 20 Line(s) | 299 | if (plasmoid.configuration.extraItems.indexOf(plasmoidId) < 0) { | |||
---|---|---|---|---|---|
302 | plasmoid.configuration.extraItems = extraItems; | 302 | plasmoid.configuration.extraItems = extraItems; | ||
303 | } | 303 | } | ||
304 | } | 304 | } | ||
305 | } | 305 | } | ||
306 | 306 | | |||
307 | //Main Layout | 307 | //Main Layout | ||
308 | Flow { | 308 | Flow { | ||
309 | id: tasksRow | 309 | id: tasksRow | ||
310 | spacing: 0 | 310 | spacing: plasmoid.configuration.iconsSpacing | ||
Zren: Hmm. We might want to scale by DPI. While the default 0px will not be affected by DPI, if a… | |||||
We probably need to round it too so that the icons start on integer coordinates. spacing: Math.round(plasmoid.configuration.iconsSpacing * units.devicePixelRatio) Zren: We probably need to round it too so that the icons start on integer coordinates.
```
spacing… | |||||
311 | height: parent.height - (vertical && expander.visible ? expander.height : 0) | 311 | height: parent.height - (vertical && expander.visible ? expander.height : 0) | ||
312 | width: parent.width - (vertical || !expander.visible ? 0 : expander.width) | 312 | width: parent.width - (vertical || !expander.visible ? 0 : expander.width) | ||
313 | property string skipItems | 313 | property string skipItems | ||
314 | flow: vertical ? Flow.LeftToRight : Flow.TopToBottom | 314 | flow: vertical ? Flow.LeftToRight : Flow.TopToBottom | ||
315 | //To make it look centered | 315 | //To make it look centered | ||
316 | y: Math.round(height/2 - childrenRect.height/2) | 316 | y: Math.round(height/2 - childrenRect.height/2) | ||
317 | x: (expander.visible && LayoutMirroring.enabled ? expander.width : 0) + Math.round(width/2 - childrenRect.width/2) | 317 | x: (expander.visible && LayoutMirroring.enabled ? expander.width : 0) + Math.round(width/2 - childrenRect.width/2) | ||
318 | 318 | | |||
▲ Show 20 Lines • Show All 70 Lines • Show Last 20 Lines |
Hmm. We might want to scale by DPI. While the default 0px will not be affected by DPI, if a Look And Feel sets it to 10px, it would look different for users with 1x DPI and 2x DPI.
Eg: