Add tooltip to repeat control
This commit is contained in:
parent
de70009ed2
commit
ca0de9d07e
2 changed files with 14 additions and 2 deletions
|
|
@ -32,3 +32,9 @@ open-media-folder = Open media folder...
|
||||||
open-recent-media-folder = Open recent media folder
|
open-recent-media-folder = Open recent media folder
|
||||||
close-media-folder = Close media folder
|
close-media-folder = Close media folder
|
||||||
quit = Quit
|
quit = Quit
|
||||||
|
|
||||||
|
# Controls
|
||||||
|
|
||||||
|
repeat-disabled = Repeat disabled
|
||||||
|
repeat-always = Repeat always
|
||||||
|
repeat-once = Repeat once
|
||||||
|
|
|
||||||
10
src/main.rs
10
src/main.rs
|
|
@ -1656,7 +1656,7 @@ impl Application for App {
|
||||||
)
|
)
|
||||||
.on_press(Message::PlayPause),
|
.on_press(Message::PlayPause),
|
||||||
);
|
);
|
||||||
row = row.push(
|
row = row.push(widget::tooltip(
|
||||||
widget::button::icon(
|
widget::button::icon(
|
||||||
widget::icon::from_name(match self.flags.config_state.player_state.repeat {
|
widget::icon::from_name(match self.flags.config_state.player_state.repeat {
|
||||||
RepeatState::Disabled => "media-playlist-no-repeat-symbolic",
|
RepeatState::Disabled => "media-playlist-no-repeat-symbolic",
|
||||||
|
|
@ -1672,7 +1672,13 @@ impl Application for App {
|
||||||
RepeatState::Once => RepeatState::Disabled,
|
RepeatState::Once => RepeatState::Disabled,
|
||||||
},
|
},
|
||||||
)),
|
)),
|
||||||
);
|
match self.flags.config_state.player_state.repeat {
|
||||||
|
RepeatState::Disabled => fl!("repeat-disabled"),
|
||||||
|
RepeatState::Always => fl!("repeat-always"),
|
||||||
|
RepeatState::Once => fl!("repeat-once"),
|
||||||
|
},
|
||||||
|
widget::tooltip::Position::Top,
|
||||||
|
));
|
||||||
if self.core.is_condensed() {
|
if self.core.is_condensed() {
|
||||||
row = row.push(widget::horizontal_space(Length::Fill));
|
row = row.push(widget::horizontal_space(Length::Fill));
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue