Changeset View
Changeset View
Standalone View
Standalone View
src/qmlcontrols/kcmcontrols/qml/GridDelegate.qml
Show First 20 Lines • Show All 65 Lines • ▼ Show 20 Line(s) | 33 | T2.ItemDelegate { | |||
---|---|---|---|---|---|
66 | 66 | | |||
67 | Rectangle { | 67 | Rectangle { | ||
68 | id: thumbnail | 68 | id: thumbnail | ||
69 | anchors { | 69 | anchors { | ||
70 | centerIn: parent | 70 | centerIn: parent | ||
71 | verticalCenterOffset: Math.ceil(-label.height/2) | 71 | verticalCenterOffset: Math.ceil(-label.height/2) | ||
72 | } | 72 | } | ||
73 | width: Kirigami.Settings.isMobile ? delegate.width - Kirigami.Units.gridUnit : Math.min(delegate.GridView.view.implicitCellWidth, delegate.width - Kirigami.Units.gridUnit) | 73 | width: Kirigami.Settings.isMobile ? delegate.width - Kirigami.Units.gridUnit : Math.min(delegate.GridView.view.implicitCellWidth, delegate.width - Kirigami.Units.gridUnit) | ||
74 | height: Math.round(width / 1.6) | 74 | height: Kirigami.Settings.isMobile ? Math.round((delegate.width - Kirigami.Units.gridUnit) / 1.6) | ||
75 | : Math.min(delegate.GridView.view.implicitCellHeight - Kirigami.Units.gridUnit * 2, | ||||
76 | delegate.height - Kirigami.Units.gridUnit) | ||||
75 | radius: Kirigami.Units.smallSpacing | 77 | radius: Kirigami.Units.smallSpacing | ||
76 | Kirigami.Theme.inherit: false | 78 | Kirigami.Theme.inherit: false | ||
77 | Kirigami.Theme.colorSet: Kirigami.Theme.View | 79 | Kirigami.Theme.colorSet: Kirigami.Theme.View | ||
78 | 80 | | |||
79 | color: { | 81 | color: { | ||
80 | if (delegate.GridView.isCurrentItem) { | 82 | if (delegate.GridView.isCurrentItem) { | ||
81 | return Kirigami.Theme.highlightColor; | 83 | return Kirigami.Theme.highlightColor; | ||
82 | } else if (parent.hovered) { | 84 | } else if (parent.hovered) { | ||
▲ Show 20 Lines • Show All 108 Lines • Show Last 20 Lines |