Changeset View
Changeset View
Standalone View
Standalone View
containments/desktop/package/contents/ui/FolderItemDelegate.qml
Show All 11 Lines | |||||
12 | * GNU General Public License for more details. * | 12 | * GNU General Public License for more details. * | ||
13 | * * | 13 | * * | ||
14 | * You should have received a copy of the GNU General Public License * | 14 | * You should have received a copy of the GNU General Public License * | ||
15 | * along with this program; if not, write to the * | 15 | * along with this program; if not, write to the * | ||
16 | * Free Software Foundation, Inc., * | 16 | * Free Software Foundation, Inc., * | ||
17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * | 17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * | ||
18 | ***************************************************************************/ | 18 | ***************************************************************************/ | ||
19 | 19 | | |||
20 | import QtQuick 2.4 | 20 | import QtQuick 2.8 | ||
21 | import QtGraphicalEffects 1.0 | 21 | import QtGraphicalEffects 1.0 | ||
22 | 22 | | |||
23 | import org.kde.plasma.plasmoid 2.0 | 23 | import org.kde.plasma.plasmoid 2.0 | ||
24 | 24 | | |||
25 | import org.kde.plasma.core 2.0 as PlasmaCore | 25 | import org.kde.plasma.core 2.0 as PlasmaCore | ||
26 | import org.kde.plasma.components 2.0 as PlasmaComponents | 26 | import org.kde.plasma.components 2.0 as PlasmaComponents | ||
27 | import org.kde.kquickcontrolsaddons 2.0 | 27 | import org.kde.kquickcontrolsaddons 2.0 | ||
28 | 28 | | |||
Show All 24 Lines | 52 | if (popupDialog) { | |||
53 | popupDialog.requestDestroy(); | 53 | popupDialog.requestDestroy(); | ||
54 | loader.item.popupDialog = null; | 54 | loader.item.popupDialog = null; | ||
55 | } | 55 | } | ||
56 | } | 56 | } | ||
57 | 57 | | |||
58 | Loader { | 58 | Loader { | ||
59 | id: loader | 59 | id: loader | ||
60 | 60 | | |||
61 | anchors.fill: parent | 61 | // On the desktop we pad our cellSize to avoid a gap at the right/bottom of the screen. | ||
62 | // The padding per item is quite small and causes the delegate to be positioned on fractional pixels | ||||
63 | // leading to blurry rendering. The Loader is offset to account for this. | ||||
64 | x: -main.x % 1 | ||||
65 | y: -main.y % 1 | ||||
66 | width: parent.width | ||||
67 | height: parent.height | ||||
62 | 68 | | |||
63 | visible: status === Loader.Ready | 69 | visible: status === Loader.Ready | ||
64 | 70 | | |||
65 | active: !model.blank | 71 | active: !model.blank | ||
66 | 72 | | |||
67 | sourceComponent: delegateImplementation | 73 | sourceComponent: delegateImplementation | ||
68 | 74 | | |||
69 | asynchronous: true | 75 | asynchronous: true | ||
▲ Show 20 Lines • Show All 273 Lines • ▼ Show 20 Line(s) | 348 | color: (frameLoader.textShadow && frameLoader.textShadow.visible | |||
343 | ? "#fff" : PlasmaCore.ColorScope.textColor) | 349 | ? "#fff" : PlasmaCore.ColorScope.textColor) | ||
344 | 350 | | |||
345 | opacity: model.isHidden ? 0.6 : 1 | 351 | opacity: model.isHidden ? 0.6 : 1 | ||
346 | 352 | | |||
347 | text: model.blank ? "" : model.display | 353 | text: model.blank ? "" : model.display | ||
348 | 354 | | |||
349 | font.italic: model.isLink | 355 | font.italic: model.isLink | ||
350 | 356 | | |||
351 | visible: !editor || editor.targetItem != main | 357 | visible: { | ||
358 | if (editor && editor.targetItem === main) { | ||||
359 | return false; | ||||
360 | } | ||||
361 | | ||||
362 | // DropShadow renders this Item already, hide it unless we're not rendering with OpenGL where DropShadow won't function. | ||||
363 | if (frameLoader.textShadow && frameLoader.textShadow.visible && GraphicsInfo.api === GraphicsInfo.OpenGL) { | ||||
364 | return false; | ||||
365 | } | ||||
366 | | ||||
367 | return true; | ||||
368 | } | ||||
352 | } | 369 | } | ||
353 | 370 | | |||
354 | Component { | 371 | Component { | ||
355 | id: frameComponent | 372 | id: frameComponent | ||
356 | 373 | | |||
357 | PlasmaCore.FrameSvgItem { | 374 | PlasmaCore.FrameSvgItem { | ||
358 | prefix: frameLoader.prefix | 375 | prefix: frameLoader.prefix | ||
359 | 376 | | |||
▲ Show 20 Lines • Show All 123 Lines • Show Last 20 Lines |