From 61dc844000e58ac82904e93c10a91bc6fe05710d Mon Sep 17 00:00:00 2001 From: Sumner Evans Date: Fri, 22 May 2020 21:17:03 -0600 Subject: [PATCH] Added more chromecast icons --- sublime/ui/app_styles.css | 14 +++-- .../icons/chromecast-connected-symbolic.svg | 3 + .../chromecast-connecting-0-symbolic.svg | 8 +++ .../chromecast-connecting-1-symbolic.svg | 8 +++ .../chromecast-connecting-2-symbolic.svg | 7 +++ sublime/ui/icons/chromecast-symbolic.svg | 2 +- sublime/ui/icons/server-online.svg | 62 +++++++++++++++++++ sublime/ui/main.py | 20 ++++++ sublime/ui/player_controls.py | 2 +- 9 files changed, 119 insertions(+), 7 deletions(-) create mode 100644 sublime/ui/icons/chromecast-connected-symbolic.svg create mode 100644 sublime/ui/icons/chromecast-connecting-0-symbolic.svg create mode 100644 sublime/ui/icons/chromecast-connecting-1-symbolic.svg create mode 100644 sublime/ui/icons/chromecast-connecting-2-symbolic.svg create mode 100644 sublime/ui/icons/server-online.svg diff --git a/sublime/ui/app_styles.css b/sublime/ui/app_styles.css index 6431ce0..88aaa96 100644 --- a/sublime/ui/app_styles.css +++ b/sublime/ui/app_styles.css @@ -1,11 +1,15 @@ /* ********** Main ********** */ -#server-connection-icon { /* TODO remove */ - /* box-shadow: 0px 0px 3px green; */ +#connected-to-label { + margin: 5px 15px; + font-size: 1.2em; } -#connected-to-label { - margin-top: 5px; - font-size: 1.2em; +#connected-status-row { + margin-bottom: 5px; +} + +#online-status-icon { + margin-right: 10px; } #menu-header { diff --git a/sublime/ui/icons/chromecast-connected-symbolic.svg b/sublime/ui/icons/chromecast-connected-symbolic.svg new file mode 100644 index 0000000..da2b1de --- /dev/null +++ b/sublime/ui/icons/chromecast-connected-symbolic.svg @@ -0,0 +1,3 @@ + + + diff --git a/sublime/ui/icons/chromecast-connecting-0-symbolic.svg b/sublime/ui/icons/chromecast-connecting-0-symbolic.svg new file mode 100644 index 0000000..7366a7c --- /dev/null +++ b/sublime/ui/icons/chromecast-connecting-0-symbolic.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/sublime/ui/icons/chromecast-connecting-1-symbolic.svg b/sublime/ui/icons/chromecast-connecting-1-symbolic.svg new file mode 100644 index 0000000..8870bff --- /dev/null +++ b/sublime/ui/icons/chromecast-connecting-1-symbolic.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/sublime/ui/icons/chromecast-connecting-2-symbolic.svg b/sublime/ui/icons/chromecast-connecting-2-symbolic.svg new file mode 100644 index 0000000..6e5e810 --- /dev/null +++ b/sublime/ui/icons/chromecast-connecting-2-symbolic.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/sublime/ui/icons/chromecast-symbolic.svg b/sublime/ui/icons/chromecast-symbolic.svg index 16d727f..9bc8f80 100644 --- a/sublime/ui/icons/chromecast-symbolic.svg +++ b/sublime/ui/icons/chromecast-symbolic.svg @@ -1,3 +1,3 @@ - + diff --git a/sublime/ui/icons/server-online.svg b/sublime/ui/icons/server-online.svg new file mode 100644 index 0000000..3149ae5 --- /dev/null +++ b/sublime/ui/icons/server-online.svg @@ -0,0 +1,62 @@ + + + + + + + + image/svg+xml + + + + + + + + + diff --git a/sublime/ui/main.py b/sublime/ui/main.py index 344d6b3..20965fc 100644 --- a/sublime/ui/main.py +++ b/sublime/ui/main.py @@ -338,6 +338,7 @@ class MainWindow(Gtk.ApplicationWindow): vbox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) # Current Server + self.connected_to_label = self._create_label( "No Music Source Selected", name="connected-to-label", @@ -345,6 +346,25 @@ class MainWindow(Gtk.ApplicationWindow): ) vbox.add(self.connected_to_label) + connected_status_box = Gtk.Box( + orientation=Gtk.Orientation.HORIZONTAL, name="connected-status-row" + ) + connected_status_box.pack_start(Gtk.Box(), True, True, 0) + + self.connection_status_icon = Gtk.Image.new_from_icon_name( + "server-online", Gtk.IconSize.BUTTON + ) + self.connection_status_icon.set_name("online-status-icon") + connected_status_box.add(self.connection_status_icon) + + self.connection_status_label = Gtk.Label( + label="Connected", name="connection-status-label" + ) + connected_status_box.add(self.connection_status_label) + + connected_status_box.pack_start(Gtk.Box(), True, True, 0) + vbox.add(connected_status_box) + # Offline Mode offline_box, self.offline_mode_switch = self._create_toggle_menu_button( "Offline Mode", "offline_mode" diff --git a/sublime/ui/player_controls.py b/sublime/ui/player_controls.py index a96ba53..dd2cb33 100644 --- a/sublime/ui/player_controls.py +++ b/sublime/ui/player_controls.py @@ -609,7 +609,7 @@ class PlayerControls(Gtk.ActionBar): # Device button (for chromecast) self.device_button = IconButton( - "chromecast-symbolic", + "chromecast-connected-symbolic", "Show available audio output devices", icon_size=Gtk.IconSize.LARGE_TOOLBAR, )