Changeset View
Changeset View
Standalone View
Standalone View
applets/taskmanager/package/contents/ui/ToolTipInstance.qml
Show First 20 Lines • Show All 65 Lines • ▼ Show 20 Line(s) | 65 | if (lastSlashPos < 0) { | |||
---|---|---|---|---|---|
66 | return ""; | 66 | return ""; | ||
67 | } | 67 | } | ||
68 | var lastUrlPart = xesamUrl.substring(lastSlashPos + 1) | 68 | var lastUrlPart = xesamUrl.substring(lastSlashPos + 1) | ||
69 | return decodeURIComponent(lastUrlPart); | 69 | return decodeURIComponent(lastUrlPart); | ||
70 | } | 70 | } | ||
71 | readonly property string artist: currentMetadata["xesam:artist"] || "" | 71 | readonly property string artist: currentMetadata["xesam:artist"] || "" | ||
72 | readonly property string albumArt: currentMetadata["mpris:artUrl"] || "" | 72 | readonly property string albumArt: currentMetadata["mpris:artUrl"] || "" | ||
73 | 73 | | |||
74 | width: isWin? units.gridUnit * 16 : undefined | ||||
75 | height: isWin? width / 1.5 : undefined | ||||
74 | spacing: units.smallSpacing | 76 | spacing: units.smallSpacing | ||
75 | 77 | | |||
76 | // launcher icon + text labels + close button | 78 | // launcher icon + text labels + close button | ||
77 | RowLayout { | 79 | RowLayout { | ||
78 | id: header | 80 | id: header | ||
79 | // match spacing of DefaultToolTip.qml in plasma-framework | 81 | // match spacing of DefaultToolTip.qml in plasma-framework | ||
80 | spacing: isWin ? units.smallSpacing : units.largeSpacing | 82 | spacing: isWin ? units.smallSpacing : units.largeSpacing | ||
81 | 83 | | |||
82 | // This number controls the overall size of the window tooltips | 84 | Layout.fillWidth: true | ||
83 | Layout.maximumWidth: units.gridUnit * 16 | | |||
84 | Layout.minimumWidth: isWin ? Layout.maximumWidth : 0 | | |||
85 | Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter | 85 | Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter | ||
86 | // match margins of DefaultToolTip.qml in plasma-framework | 86 | // match margins of DefaultToolTip.qml in plasma-framework | ||
87 | Layout.margins: isWin ? 0 : units.gridUnit / 2 | 87 | Layout.margins: isWin ? 0 : units.gridUnit / 2 | ||
88 | 88 | | |||
89 | // launcher icon | 89 | // launcher icon | ||
90 | PlasmaCore.IconItem { | 90 | PlasmaCore.IconItem { | ||
91 | Layout.preferredWidth: units.iconSizes.medium | 91 | Layout.preferredWidth: units.iconSizes.medium | ||
92 | Layout.preferredHeight: units.iconSizes.medium | 92 | Layout.preferredHeight: units.iconSizes.medium | ||
▲ Show 20 Lines • Show All 73 Lines • ▼ Show 20 Line(s) | 156 | PlasmaComponents3.ToolButton { | |||
166 | } | 166 | } | ||
167 | } | 167 | } | ||
168 | } | 168 | } | ||
169 | 169 | | |||
170 | // thumbnail container | 170 | // thumbnail container | ||
171 | Item { | 171 | Item { | ||
172 | id: thumbnailSourceItem | 172 | id: thumbnailSourceItem | ||
173 | 173 | | |||
174 | Layout.minimumWidth: header.width | 174 | Layout.fillWidth: true | ||
175 | Layout.preferredHeight: header.width / 2 | 175 | Layout.fillHeight: true | ||
176 | 176 | | |||
177 | visible: isWin | 177 | visible: isWin | ||
178 | 178 | | |||
179 | readonly property bool isMinimized: isGroup ? IsMinimized == true : isMinimizedParent | 179 | readonly property bool isMinimized: isGroup ? IsMinimized == true : isMinimizedParent | ||
180 | // TODO: this causes XCB error message when being visible the first time | 180 | // TODO: this causes XCB error message when being visible the first time | ||
181 | property int winId: isWin && windows[flatIndex] !== undefined ? windows[flatIndex] : 0 | 181 | property int winId: isWin && windows[flatIndex] !== undefined ? windows[flatIndex] : 0 | ||
182 | 182 | | |||
183 | // There's no PlasmaComponents3 version | 183 | // There's no PlasmaComponents3 version | ||
▲ Show 20 Lines • Show All 60 Lines • ▼ Show 20 Line(s) | 241 | ToolTipWindowMouseArea { | |||
244 | rootTask: parentTask | 244 | rootTask: parentTask | ||
245 | modelIndex: submodelIndex | 245 | modelIndex: submodelIndex | ||
246 | winId: thumbnailSourceItem.winId | 246 | winId: thumbnailSourceItem.winId | ||
247 | } | 247 | } | ||
248 | } | 248 | } | ||
249 | 249 | | |||
250 | // Player controls row | 250 | // Player controls row | ||
251 | RowLayout { | 251 | RowLayout { | ||
252 | Layout.maximumWidth: header.width | 252 | Layout.fillWidth: true | ||
253 | 253 | | |||
254 | visible: hasPlayer | 254 | visible: hasPlayer | ||
255 | enabled: canControl | 255 | enabled: canControl | ||
256 | 256 | | |||
257 | ColumnLayout { | 257 | ColumnLayout { | ||
258 | Layout.fillWidth: true | 258 | Layout.fillWidth: true | ||
259 | Layout.topMargin: units.smallSpacing | 259 | Layout.topMargin: units.smallSpacing | ||
260 | Layout.bottomMargin: units.smallSpacing | 260 | Layout.bottomMargin: units.smallSpacing | ||
▲ Show 20 Lines • Show All 176 Lines • Show Last 20 Lines |