Changeset View
Changeset View
Standalone View
Standalone View
lookandfeel/contents/lockscreen/MediaControls.qml
Show First 20 Lines • Show All 111 Lines • ▼ Show 20 Line(s) | 111 | ColumnLayout { | |||
---|---|---|---|---|---|
112 | Layout.fillWidth: true | 112 | Layout.fillWidth: true | ||
113 | spacing: 0 | 113 | spacing: 0 | ||
114 | 114 | | |||
115 | PlasmaExtras.Heading { | 115 | PlasmaExtras.Heading { | ||
116 | Layout.fillWidth: true | 116 | Layout.fillWidth: true | ||
117 | level: 4 | 117 | level: 4 | ||
118 | wrapMode: Text.NoWrap | 118 | wrapMode: Text.NoWrap | ||
119 | elide: Text.ElideRight | 119 | elide: Text.ElideRight | ||
120 | text: mpris2Source.track || i18n("No media playing") | 120 | text: mpris2Source.track || i18nd("plasma_lookandfeel_org.kde.lookandfeel", "No media playing") | ||
121 | textFormat: Text.PlainText | 121 | textFormat: Text.PlainText | ||
122 | } | 122 | } | ||
123 | 123 | | |||
124 | PlasmaExtras.Heading { | 124 | PlasmaExtras.Heading { | ||
125 | Layout.fillWidth: true | 125 | Layout.fillWidth: true | ||
126 | level: 5 | 126 | level: 5 | ||
127 | wrapMode: Text.NoWrap | 127 | wrapMode: Text.NoWrap | ||
128 | elide: Text.ElideRight | 128 | elide: Text.ElideRight | ||
129 | // if no artist is given, show player name instead | 129 | // if no artist is given, show player name instead | ||
130 | text: mpris2Source.artist || mpris2Source.identity || "" | 130 | text: mpris2Source.artist || mpris2Source.identity || "" | ||
131 | textFormat: Text.PlainText | 131 | textFormat: Text.PlainText | ||
132 | } | 132 | } | ||
133 | } | 133 | } | ||
134 | 134 | | |||
135 | PlasmaComponents.ToolButton { | 135 | PlasmaComponents.ToolButton { | ||
136 | enabled: mpris2Source.canGoBack | 136 | enabled: mpris2Source.canGoBack | ||
137 | iconName: LayoutMirroring.enabled ? "media-skip-forward" : "media-skip-backward" | 137 | iconName: LayoutMirroring.enabled ? "media-skip-forward" : "media-skip-backward" | ||
138 | onClicked: mpris2Source.goPrevious() | 138 | onClicked: mpris2Source.goPrevious() | ||
139 | visible: mpris2Source.canGoBack || mpris2Source.canGoNext | 139 | visible: mpris2Source.canGoBack || mpris2Source.canGoNext | ||
140 | Accessible.name: i18n("Previous track") | 140 | Accessible.name: i18nd("plasma_lookandfeel_org.kde.lookandfeel", "Previous track") | ||
141 | } | 141 | } | ||
142 | 142 | | |||
143 | PlasmaComponents.ToolButton { | 143 | PlasmaComponents.ToolButton { | ||
144 | Layout.fillHeight: true | 144 | Layout.fillHeight: true | ||
145 | Layout.preferredWidth: height // make this button bigger | 145 | Layout.preferredWidth: height // make this button bigger | ||
146 | iconName: mpris2Source.playing ? "media-playback-pause" : "media-playback-start" | 146 | iconName: mpris2Source.playing ? "media-playback-pause" : "media-playback-start" | ||
147 | onClicked: mpris2Source.playPause() | 147 | onClicked: mpris2Source.playPause() | ||
148 | Accessible.name: i18n("Play or Pause media") | 148 | Accessible.name: i18nd("plasma_lookandfeel_org.kde.lookandfeel", "Play or Pause media") | ||
149 | } | 149 | } | ||
150 | 150 | | |||
151 | PlasmaComponents.ToolButton { | 151 | PlasmaComponents.ToolButton { | ||
152 | enabled: mpris2Source.canGoNext | 152 | enabled: mpris2Source.canGoNext | ||
153 | iconName: LayoutMirroring.enabled ? "media-skip-backward" : "media-skip-forward" | 153 | iconName: LayoutMirroring.enabled ? "media-skip-backward" : "media-skip-forward" | ||
154 | onClicked: mpris2Source.goNext() | 154 | onClicked: mpris2Source.goNext() | ||
155 | visible: mpris2Source.canGoBack || mpris2Source.canGoNext | 155 | visible: mpris2Source.canGoBack || mpris2Source.canGoNext | ||
156 | Accessible.name: i18n("Next track") | 156 | Accessible.name: i18nd("plasma_lookandfeel_org.kde.lookandfeel", "Next track") | ||
157 | } | 157 | } | ||
158 | } | 158 | } | ||
159 | } | 159 | } |