Changeset View
Changeset View
Standalone View
Standalone View
src/qml/MediaPlayerControl.qml
Context not available. | |||||
61 | id: applicationMenuAction | 61 | id: applicationMenuAction | ||
---|---|---|---|---|---|
62 | text: i18nc("open application menu", "Application Menu") | 62 | text: i18nc("open application menu", "Application Menu") | ||
63 | icon.name: "application-menu" | 63 | icon.name: "application-menu" | ||
64 | onTriggered: openMenu() | 64 | onTriggered: { | ||
65 | menuButton.focus = false | ||||
66 | openMenu() | ||||
67 | } | ||||
65 | } | 68 | } | ||
66 | 69 | | |||
67 | Action { | 70 | Action { | ||
68 | id: repeatAction | 71 | id: repeatAction | ||
69 | text: i18nc("toggle repeat mode for playlist", "Toggle Repeat") | 72 | text: i18nc("toggle repeat mode for playlist", "Toggle Repeat") | ||
70 | icon.name: musicWidget.repeat ? "media-repeat-all" : "media-repeat-none" | 73 | icon.name: musicWidget.repeat ? "media-repeat-all" : "media-repeat-none" | ||
71 | onTriggered: musicWidget.repeat = !musicWidget.repeat | 74 | onTriggered: { | ||
75 | repeatButton.focus = false | ||||
76 | musicWidget.repeat = !musicWidget.repeat | ||||
77 | } | ||||
72 | } | 78 | } | ||
73 | 79 | | |||
74 | Action { | 80 | Action { | ||
75 | id: shuffleAction | 81 | id: shuffleAction | ||
76 | text: i18nc("toggle shuffle mode for playlist", "Toggle Shuffle") | 82 | text: i18nc("toggle shuffle mode for playlist", "Toggle Shuffle") | ||
77 | icon.name: musicWidget.shuffle ? "media-playlist-shuffle" : "media-playlist-normal" | 83 | icon.name: musicWidget.shuffle ? "media-playlist-shuffle" : "media-playlist-normal" | ||
78 | onTriggered: musicWidget.shuffle = !musicWidget.shuffle | 84 | onTriggered: { | ||
85 | shuffleButton.focus = false | ||||
86 | musicWidget.shuffle = !musicWidget.shuffle | ||||
87 | } | ||||
79 | } | 88 | } | ||
80 | 89 | | |||
81 | Action { | 90 | Action { | ||
82 | id: muteAction | 91 | id: muteAction | ||
83 | text: i18nc("toggle mute mode for player", "Toggle Mute") | 92 | text: i18nc("toggle mute mode for player", "Toggle Mute") | ||
84 | icon.name: musicWidget.muted ? "player-volume-muted" : "player-volume" | 93 | icon.name: musicWidget.muted ? "player-volume-muted" : "player-volume" | ||
85 | onTriggered: musicWidget.muted = !musicWidget.muted | 94 | onTriggered: { | ||
95 | muteButton.focus = false | ||||
96 | musicWidget.muted = !musicWidget.muted | ||||
97 | } | ||||
86 | } | 98 | } | ||
87 | 99 | | |||
88 | Action { | 100 | Action { | ||
89 | id: playPauseAction | 101 | id: playPauseAction | ||
90 | text: i18nc("toggle play and pause for the audio player", "Toggle Play and Pause") | 102 | text: i18nc("toggle play and pause for the audio player", "Toggle Play and Pause") | ||
91 | icon.name: musicWidget.isPlaying? "media-playback-pause" : "media-playback-start" | 103 | icon.name: musicWidget.isPlaying? "media-playback-pause" : "media-playback-start" | ||
92 | onTriggered: musicWidget.isPlaying ? musicWidget.pause() : musicWidget.play() | 104 | onTriggered: { | ||
105 | playPauseButton.focus = false | ||||
106 | musicWidget.isPlaying ? musicWidget.pause() : musicWidget.play() | ||||
107 | } | ||||
93 | enabled: playEnabled | 108 | enabled: playEnabled | ||
94 | } | 109 | } | ||
95 | 110 | | |||
Context not available. | |||||
97 | id: skipBackwardAction | 112 | id: skipBackwardAction | ||
98 | text: i18nc("skip backward in playlists", "Skip Backward") | 113 | text: i18nc("skip backward in playlists", "Skip Backward") | ||
99 | icon.name: musicWidget.LayoutMirroring.enabled ? "media-skip-forward" : "media-skip-backward" | 114 | icon.name: musicWidget.LayoutMirroring.enabled ? "media-skip-forward" : "media-skip-backward" | ||
100 | onTriggered: musicWidget.playPrevious() | 115 | onTriggered: { | ||
116 | skipBackwardButton.focus = false | ||||
117 | musicWidget.playPrevious() | ||||
118 | } | ||||
101 | enabled: skipBackwardEnabled | 119 | enabled: skipBackwardEnabled | ||
102 | } | 120 | } | ||
103 | 121 | | |||
Context not available. | |||||
105 | id: skipForwardAction | 123 | id: skipForwardAction | ||
106 | text: i18nc("skip forward in playlists", "Skip Forward") | 124 | text: i18nc("skip forward in playlists", "Skip Forward") | ||
107 | icon.name: musicWidget.LayoutMirroring.enabled ? "media-skip-backward" : "media-skip-forward" | 125 | icon.name: musicWidget.LayoutMirroring.enabled ? "media-skip-backward" : "media-skip-forward" | ||
108 | onTriggered: musicWidget.playNext() | 126 | onTriggered: { | ||
127 | skipForwardButton.focus = false | ||||
128 | musicWidget.playNext() | ||||
129 | } | ||||
109 | enabled: skipForwardEnabled | 130 | enabled: skipForwardEnabled | ||
110 | } | 131 | } | ||
111 | 132 | | |||
Context not available. | |||||
113 | id: minimizeMaximizeAction | 134 | id: minimizeMaximizeAction | ||
114 | text: i18nc("toggle between maximized and minimized ivre", "Toggle Maximize") | 135 | text: i18nc("toggle between maximized and minimized ivre", "Toggle Maximize") | ||
115 | icon.name: musicWidget.isMaximized ? "draw-arrow-up" : "draw-arrow-down" | 136 | icon.name: musicWidget.isMaximized ? "draw-arrow-up" : "draw-arrow-down" | ||
116 | onTriggered: musicWidget.isMaximized = !musicWidget.isMaximized | 137 | onTriggered: { | ||
138 | minimizeMaximizeButton.focus = false | ||||
139 | musicWidget.isMaximized = !musicWidget.isMaximized | ||||
140 | } | ||||
117 | } | 141 | } | ||
118 | 142 | | |||
119 | Rectangle { | 143 | Rectangle { | ||
Context not available. | |||||
128 | spacing: 5 | 152 | spacing: 5 | ||
129 | 153 | | |||
130 | FlatButtonWithToolTip { | 154 | FlatButtonWithToolTip { | ||
131 | id: minimzeMaximizeAction | 155 | id: minimizeMaximizeButton | ||
132 | action: minimizeMaximizeAction | 156 | action: minimizeMaximizeAction | ||
133 | 157 | | |||
134 | Layout.preferredWidth: elisaTheme.smallControlButtonSize | 158 | Layout.preferredWidth: elisaTheme.smallControlButtonSize | ||
Context not available. | |||||
145 | FlatButtonWithToolTip { | 169 | FlatButtonWithToolTip { | ||
146 | id: skipBackwardButton | 170 | id: skipBackwardButton | ||
147 | action: skipBackwardAction | 171 | action: skipBackwardAction | ||
148 | focus: skipBackwardEnabled | | |||
149 | 172 | | |||
150 | Layout.preferredWidth: elisaTheme.smallControlButtonSize | 173 | Layout.preferredWidth: elisaTheme.smallControlButtonSize | ||
151 | Layout.preferredHeight: elisaTheme.smallControlButtonSize | 174 | Layout.preferredHeight: elisaTheme.smallControlButtonSize | ||
Context not available. | |||||
159 | FlatButtonWithToolTip { | 182 | FlatButtonWithToolTip { | ||
160 | id: playPauseButton | 183 | id: playPauseButton | ||
161 | action: playPauseAction | 184 | action: playPauseAction | ||
162 | focus: playEnabled | | |||
163 | 185 | | |||
164 | Layout.preferredWidth: elisaTheme.smallControlButtonSize | 186 | Layout.preferredWidth: elisaTheme.smallControlButtonSize | ||
165 | Layout.preferredHeight: elisaTheme.smallControlButtonSize | 187 | Layout.preferredHeight: elisaTheme.smallControlButtonSize | ||
Context not available. | |||||
173 | FlatButtonWithToolTip { | 195 | FlatButtonWithToolTip { | ||
174 | id: skipForwardButton | 196 | id: skipForwardButton | ||
175 | action: skipForwardAction | 197 | action: skipForwardAction | ||
176 | focus: skipForwardEnabled | | |||
177 | 198 | | |||
178 | Layout.preferredWidth: elisaTheme.smallControlButtonSize | 199 | Layout.preferredWidth: elisaTheme.smallControlButtonSize | ||
179 | Layout.preferredHeight: elisaTheme.smallControlButtonSize | 200 | Layout.preferredHeight: elisaTheme.smallControlButtonSize | ||
Context not available. | |||||
302 | FlatButtonWithToolTip { | 323 | FlatButtonWithToolTip { | ||
303 | id: muteButton | 324 | id: muteButton | ||
304 | action: muteAction | 325 | action: muteAction | ||
305 | focus: true | | |||
306 | 326 | | |||
307 | Layout.preferredWidth: elisaTheme.smallControlButtonSize | 327 | Layout.preferredWidth: elisaTheme.smallControlButtonSize | ||
308 | Layout.preferredHeight: elisaTheme.smallControlButtonSize | 328 | Layout.preferredHeight: elisaTheme.smallControlButtonSize | ||
Context not available. | |||||
364 | } | 384 | } | ||
365 | 385 | | |||
366 | FlatButtonWithToolTip { | 386 | FlatButtonWithToolTip { | ||
367 | focus: true | | |||
368 | action: shuffleAction | 387 | action: shuffleAction | ||
369 | id: shuffleButton | 388 | id: shuffleButton | ||
370 | 389 | | |||
Context not available. | |||||
378 | } | 397 | } | ||
379 | 398 | | |||
380 | FlatButtonWithToolTip { | 399 | FlatButtonWithToolTip { | ||
381 | focus: true | | |||
382 | action: repeatAction | 400 | action: repeatAction | ||
383 | id: repeatButton | 401 | id: repeatButton | ||
384 | 402 | | |||
Context not available. | |||||
394 | FlatButtonWithToolTip { | 412 | FlatButtonWithToolTip { | ||
395 | id: menuButton | 413 | id: menuButton | ||
396 | action: applicationMenuAction | 414 | action: applicationMenuAction | ||
397 | focus: true | | |||
398 | 415 | | |||
399 | Layout.preferredWidth: elisaTheme.smallControlButtonSize | 416 | Layout.preferredWidth: elisaTheme.smallControlButtonSize | ||
400 | Layout.preferredHeight: elisaTheme.smallControlButtonSize | 417 | Layout.preferredHeight: elisaTheme.smallControlButtonSize | ||
Context not available. |