summary refs log tree commit diff
path: root/src/player.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/player.rs')
-rw-r--r--src/player.rs13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/player.rs b/src/player.rs
index c784a04..2e234b6 100644
--- a/src/player.rs
+++ b/src/player.rs
@@ -37,6 +37,7 @@ pub enum PlayerMsg {
 #[derive(Debug)]
 pub enum PlayerOutput {
     PositionUpdate(gst::ClockTime),
+    SubtitleSelectionButtonPressed,
 }
 
 fn format_time(time: gst::ClockTime) -> String {
@@ -74,12 +75,10 @@ impl SimpleComponent for Player {
                 set_margin_all: 10,
 
                 // Play/Pause button
-                #[name = "play_pause_btn"]
                 gtk::Button {
                     #[watch]
-                    set_icon_name: if model.is_playing { "media-playback-pause" } else { "media-playback-start" },
+                    set_icon_name: if model.is_playing { "media-playback-pause-symbolic" } else { "media-playback-start-symbolic" },
                     connect_clicked => PlayerMsg::PlayPause,
-                    add_css_class: "circular",
                 },
 
                 // Current time label
@@ -116,6 +115,14 @@ impl SimpleComponent for Player {
                     set_text: &format_time(model.duration),
                     set_width_chars: 8,
                 },
+
+                // Subtitle selection button
+                gtk::Button {
+                    set_icon_name: "media-view-subtitles-symbolic",
+                    connect_clicked[sender] => move |_| {
+                        sender.output(PlayerOutput::SubtitleSelectionButtonPressed).unwrap();
+                    },
+                },
             }
         }
     }