diff options
author | Christian Dywan <christian@twotoasts.de> | 2019-03-04 22:25:26 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-04 22:25:26 +0100 |
commit | 83159193bfbdd9a1afab6e4e03d972138a540126 (patch) | |
tree | 4e5ceaa116cbc1623479fa5024f4ac2856acf8dc | |
parent | 0c5820ffe24295c0550a27537fe34ebc9ae447e8 (diff) | |
download | midori-git-83159193bfbdd9a1afab6e4e03d972138a540126.tar.gz |
Show a volume icon in tabs that are playing music (#285)
The icon appears in addition to the favicon (and close button).
-rw-r--r-- | core/tally.vala | 3 | ||||
-rw-r--r-- | ui/tally.ui | 9 |
2 files changed, 12 insertions, 0 deletions
diff --git a/core/tally.vala b/core/tally.vala index 1c263aae..1fdc65df 100644 --- a/core/tally.vala +++ b/core/tally.vala @@ -42,6 +42,8 @@ namespace Midori { [GtkChild] Favicon favicon; [GtkChild] + Gtk.Image audio; + [GtkChild] Gtk.Button close; public Tally (Tab tab) { @@ -62,6 +64,7 @@ namespace Midori { favicon.visible = !tab.is_loading; spinner.visible = !favicon.visible; }); + tab.bind_property ("is-playing-audio", audio, "visible", BindingFlags.SYNC_CREATE); // Pinned tab style: icon only tab.notify["pinned"].connect ((pspec) => { diff --git a/ui/tally.ui b/ui/tally.ui index 6766f6cf..7f2dd694 100644 --- a/ui/tally.ui +++ b/ui/tally.ui @@ -20,6 +20,14 @@ </object> </child> <child> + <object class="GtkImage" id="audio"> + <property name="icon-name">audio-volume-high-symbolic</property> + <property name="use-fallback">yes</property> + <!-- menu --> + <property name="icon-size">1</property> + </object> + </child> + <child> <object class="GtkLabel" id="caption"> <property name="ellipsize">end</property> <!-- As per docs, when ellipsized and expanded max width is the minimum --> @@ -37,6 +45,7 @@ <child> <object class="GtkImage"> <property name="icon-name">window-close-symbolic</property> + <property name="use-fallback">yes</property> <!-- menu --> <property name="icon-size">1</property> <property name="visible">yes</property> |