Changeset View
Changeset View
Standalone View
Standalone View
containments/desktop/package/contents/ui/FolderItemDelegate.qml
Show First 20 Lines • Show All 57 Lines • ▼ Show 20 Line(s) | 29 | Item { | |||
---|---|---|---|---|---|
58 | } | 58 | } | ||
59 | 59 | | |||
60 | Loader { | 60 | Loader { | ||
61 | id: loader | 61 | id: loader | ||
62 | 62 | | |||
63 | // On the desktop we pad our cellSize to avoid a gap at the right/bottom of the screen. | 63 | // On the desktop we pad our cellSize to avoid a gap at the right/bottom of the screen. | ||
64 | // The padding per item is quite small and causes the delegate to be positioned on fractional pixels | 64 | // The padding per item is quite small and causes the delegate to be positioned on fractional pixels | ||
65 | // leading to blurry rendering. The Loader is offset to account for this. | 65 | // leading to blurry rendering. The Loader is offset to account for this. | ||
66 | x: -main.x % 1 | 66 | x: -main.x % 1 | ||
broulik: That's what this hideous code is actually supposed to do | |||||
fvogt: It doesn't work though - I'll check some more. | |||||
67 | y: -main.y % 1 | 67 | y: -main.y % 1 | ||
68 | width: parent.width | 68 | width: parent.width | ||
69 | height: parent.height | 69 | height: parent.height | ||
70 | 70 | | |||
71 | visible: status === Loader.Ready | 71 | visible: status === Loader.Ready | ||
72 | 72 | | |||
73 | active: !model.blank | 73 | active: !model.blank | ||
74 | 74 | | |||
▲ Show 20 Lines • Show All 236 Lines • ▼ Show 20 Line(s) | 308 | State { // icon view | |||
311 | AnchorChanges { | 311 | AnchorChanges { | ||
312 | target: label | 312 | target: label | ||
313 | anchors.top: icon.bottom | 313 | anchors.top: icon.bottom | ||
314 | anchors.horizontalCenter: parent.horizontalCenter | 314 | anchors.horizontalCenter: parent.horizontalCenter | ||
315 | } | 315 | } | ||
316 | PropertyChanges { | 316 | PropertyChanges { | ||
317 | target: label | 317 | target: label | ||
318 | anchors.topMargin: units.smallSpacing | 318 | anchors.topMargin: units.smallSpacing | ||
319 | width: Math.min(label.implicitWidth + units.smallSpacing, parent.width - units.smallSpacing) | 319 | width: Math.round(Math.min(label.implicitWidth + units.smallSpacing, parent.width - units.smallSpacing)) | ||
320 | maximumLineCount: plasmoid.configuration.textLines | 320 | maximumLineCount: plasmoid.configuration.textLines | ||
321 | horizontalAlignment: Text.AlignHCenter | 321 | horizontalAlignment: Text.AlignHCenter | ||
322 | } | 322 | } | ||
323 | }, | 323 | }, | ||
324 | State { // list view | 324 | State { // list view | ||
325 | when: root.useListViewMode | 325 | when: root.useListViewMode | ||
326 | 326 | | |||
327 | AnchorChanges { | 327 | AnchorChanges { | ||
▲ Show 20 Lines • Show All 174 Lines • Show Last 20 Lines |
That's what this hideous code is actually supposed to do