fix those buttons
This commit is contained in:
parent
db0fee7d92
commit
bac519034d
2 changed files with 8 additions and 9 deletions
|
@ -172,7 +172,7 @@ template $UiWindow: Adw.ApplicationWindow {
|
|||
Button {
|
||||
icon-name: "media-skip-backward";
|
||||
valign: center;
|
||||
//sensitive: bind $playbin_active (template.playbin as <$Playbin>.state as <$PlaybinState>) as <bool>;
|
||||
sensitive: bind $playbin_active (template.playbin as <$Playbin>.state as <$PlaybinState>) as <bool>;
|
||||
|
||||
clicked => $on_skip_backward_clicked ();
|
||||
}
|
||||
|
@ -180,15 +180,15 @@ template $UiWindow: Adw.ApplicationWindow {
|
|||
Button {
|
||||
icon-name: "media-seek-backward";
|
||||
valign: center;
|
||||
//sensitive: bind $playbin_active (template.playbin as <$Playbin>.state as <$PlaybinState>) as <bool>;
|
||||
sensitive: bind $playbin_active (template.playbin as <$Playbin>.state as <$PlaybinState>) as <bool>;
|
||||
|
||||
clicked => $seek_backward ();
|
||||
}
|
||||
|
||||
Button {
|
||||
//icon-name: bind $play_pause_icon_name (template.playbin as <$Playbin>.state as <$PlaybinState>) as <string>;
|
||||
icon-name: bind $play_pause_icon_name (template.playbin as <$Playbin>.state as <$PlaybinState>) as <string>;
|
||||
valign: center;
|
||||
//sensitive: bind $playbin_active (template.playbin as <$Playbin>.state as <$PlaybinState>) as <bool>;
|
||||
sensitive: bind $playbin_active (template.playbin as <$Playbin>.state as <$PlaybinState>) as <bool>;
|
||||
|
||||
clicked => $on_play_pause_clicked ();
|
||||
}
|
||||
|
@ -196,7 +196,7 @@ template $UiWindow: Adw.ApplicationWindow {
|
|||
Button {
|
||||
icon-name: "media-seek-forward";
|
||||
valign: center;
|
||||
//sensitive: bind $playbin_active (template.playbin as <$Playbin>.state as <$PlaybinState>) as <bool>;
|
||||
sensitive: bind $playbin_active (template.playbin as <$Playbin>.state as <$PlaybinState>) as <bool>;
|
||||
|
||||
clicked => $seek_forward ();
|
||||
}
|
||||
|
@ -204,7 +204,7 @@ template $UiWindow: Adw.ApplicationWindow {
|
|||
Button {
|
||||
icon-name: "media-skip-forward";
|
||||
valign: center;
|
||||
//sensitive: bind $playbin_active (template.playbin as <$Playbin>.state as <$PlaybinState>) as <bool>;
|
||||
sensitive: bind $playbin_active (template.playbin as <$Playbin>.state as <$PlaybinState>) as <bool>;
|
||||
|
||||
clicked => $on_skip_forward_clicked ();
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ class Ui.Window : Adw.ApplicationWindow {
|
|||
public bool cover_art_loading { get; set; default = false; }
|
||||
public Gdk.Paintable playing_cover_art { get; set; }
|
||||
|
||||
internal Playbin playbin = new Playbin ();
|
||||
public Playbin playbin { get; private set; default = new Playbin (); }
|
||||
public PlayQueueSelection play_queue_model { get; private set; default = new PlayQueueSelection (); }
|
||||
|
||||
public Window (Gtk.Application app) {
|
||||
|
@ -168,7 +168,6 @@ class Ui.Window : Adw.ApplicationWindow {
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
[GtkCallback] private string play_pause_icon_name (PlaybinState state) {
|
||||
if (state == PlaybinState.PLAYING) {
|
||||
return "media-playback-pause";
|
||||
|
@ -179,7 +178,7 @@ class Ui.Window : Adw.ApplicationWindow {
|
|||
|
||||
[GtkCallback] private bool playbin_active (PlaybinState state) {
|
||||
return state != PlaybinState.STOPPED;
|
||||
}*/
|
||||
}
|
||||
|
||||
[GtkCallback] private string mute_button_icon_name (bool mute) {
|
||||
return mute ? "audio-volume-muted" : "audio-volume-high";
|
||||
|
|
Loading…
Reference in a new issue