Changeset View
Changeset View
Standalone View
Standalone View
applets/taskmanager/package/contents/ui/ToolTipInstance.qml
Show First 20 Lines • Show All 70 Lines • ▼ Show 20 Line(s) | 38 | ColumnLayout { | |||
---|---|---|---|---|---|
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 | spacing: units.smallSpacing | 74 | spacing: units.smallSpacing | ||
75 | 75 | | |||
76 | // launcher icon + text labels + close button | 76 | // launcher icon + text labels + close button | ||
77 | RowLayout { | 77 | RowLayout { | ||
78 | id: header | 78 | id: header | ||
79 | spacing: units.smallSpacing | 79 | // match spacing of DefaultToolTip.qml in plasma-framework | ||
80 | spacing: isWin ? units.smallSpacing : units.largeSpacing | ||||
80 | 81 | | |||
81 | // This number controls the overall size of the window tooltips | 82 | // This number controls the overall size of the window tooltips | ||
82 | Layout.maximumWidth: units.gridUnit * 16 | 83 | Layout.maximumWidth: units.gridUnit * 16 | ||
83 | Layout.minimumWidth: isWin ? Layout.maximumWidth : 0 | 84 | Layout.minimumWidth: isWin ? Layout.maximumWidth : 0 | ||
84 | Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter | 85 | Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter | ||
86 | // match margins of DefaultToolTip.qml in plasma-framework | ||||
87 | Layout.margins: isWin ? 0 : units.gridUnit / 2 | ||||
85 | 88 | | |||
86 | // launcher icon | 89 | // launcher icon | ||
87 | PlasmaCore.IconItem { | 90 | PlasmaCore.IconItem { | ||
88 | Layout.preferredWidth: units.iconSizes.medium | 91 | Layout.preferredWidth: units.iconSizes.medium | ||
89 | Layout.preferredHeight: units.iconSizes.medium | 92 | Layout.preferredHeight: units.iconSizes.medium | ||
90 | Layout.leftMargin: units.smallSpacing | | |||
91 | Layout.rightMargin: units.smallSpacing | | |||
92 | source: !isWin ? icon : "" | 93 | source: !isWin ? icon : "" | ||
93 | animated: false | 94 | animated: false | ||
94 | usesPlasmaTheme: false | 95 | usesPlasmaTheme: false | ||
95 | visible: !isWin | 96 | visible: !isWin | ||
96 | } | 97 | } | ||
97 | 98 | | |||
98 | // all textlabels | 99 | // all textlabels | ||
99 | ColumnLayout { | 100 | ColumnLayout { | ||
100 | spacing: 0 | 101 | spacing: 0 | ||
101 | // app name | 102 | // app name | ||
102 | PlasmaExtras.Heading { | 103 | PlasmaExtras.Heading { | ||
103 | id: appNameHeading | 104 | id: appNameHeading | ||
104 | level: 3 | 105 | level: 3 | ||
105 | maximumLineCount: 1 | 106 | maximumLineCount: 1 | ||
106 | lineHeight: 1 | 107 | lineHeight: isWin ? 1 : appNameHeading.lineHeight | ||
107 | Layout.fillWidth: true | 108 | Layout.fillWidth: true | ||
108 | elide: Text.ElideRight | 109 | elide: Text.ElideRight | ||
109 | text: appName | 110 | text: appName | ||
110 | opacity: flatIndex == 0 | 111 | opacity: flatIndex == 0 | ||
111 | visible: text.length !== 0 | 112 | visible: text.length !== 0 | ||
112 | } | 113 | } | ||
113 | // window title | 114 | // window title | ||
114 | PlasmaExtras.Heading { | 115 | PlasmaExtras.Heading { | ||
115 | id: winTitle | 116 | id: winTitle | ||
116 | level: 5 | 117 | level: 5 | ||
117 | maximumLineCount: 1 | 118 | maximumLineCount: 1 | ||
118 | lineHeight: 1 | 119 | lineHeight: isWin ? 1 : winTitle.lineHeight | ||
119 | Layout.fillWidth: true | 120 | Layout.fillWidth: true | ||
120 | elide: Text.ElideRight | 121 | elide: Text.ElideRight | ||
121 | text: generateTitle() | 122 | text: generateTitle() | ||
122 | opacity: 0.75 | 123 | opacity: 0.75 | ||
123 | visible: !hasPlayer && text.length !== 0 && text !== appNameHeading.text | 124 | visible: !hasPlayer && text.length !== 0 && text !== appNameHeading.text | ||
124 | } | 125 | } | ||
125 | // subtext | 126 | // subtext | ||
126 | PlasmaExtras.Heading { | 127 | PlasmaExtras.Heading { | ||
128 | id: subtext | ||||
127 | level: 6 | 129 | level: 6 | ||
128 | maximumLineCount: 1 | 130 | maximumLineCount: 1 | ||
129 | lineHeight: 1 | 131 | lineHeight: isWin ? 1 : subtext.lineHeight | ||
130 | Layout.fillWidth: true | 132 | Layout.fillWidth: true | ||
131 | elide: Text.ElideRight | 133 | elide: Text.ElideRight | ||
132 | text: isWin ? generateSubText() : "" | 134 | text: isWin ? generateSubText() : "" | ||
133 | opacity: 0.6 | 135 | opacity: 0.6 | ||
134 | visible: text.length !== 0 && text !== appNameHeading.text | 136 | visible: text.length !== 0 && text !== appNameHeading.text | ||
135 | } | 137 | } | ||
136 | } | 138 | } | ||
137 | 139 | | |||
▲ Show 20 Lines • Show All 295 Lines • Show Last 20 Lines |