Added icons for play next and add to queue and chromecast; start work on clear cache options
This commit is contained in:
@@ -3,6 +3,11 @@
|
|||||||
/* box-shadow: 0px 0px 3px green; */
|
/* box-shadow: 0px 0px 3px green; */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#menu-label {
|
||||||
|
margin-top: 10px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
#main-menu-box {
|
#main-menu-box {
|
||||||
min-width: 230px;
|
min-width: 230px;
|
||||||
}
|
}
|
||||||
|
@@ -84,14 +84,14 @@ class AlbumWithSongs(Gtk.Box):
|
|||||||
album_title_and_buttons.pack_start(self.shuffle_btn, False, False, 5)
|
album_title_and_buttons.pack_start(self.shuffle_btn, False, False, 5)
|
||||||
|
|
||||||
self.play_next_btn = IconButton(
|
self.play_next_btn = IconButton(
|
||||||
"go-top-symbolic",
|
"queue-front-symbolic",
|
||||||
"Play all of the songs in this album next",
|
"Play all of the songs in this album next",
|
||||||
sensitive=False,
|
sensitive=False,
|
||||||
)
|
)
|
||||||
album_title_and_buttons.pack_start(self.play_next_btn, False, False, 5)
|
album_title_and_buttons.pack_start(self.play_next_btn, False, False, 5)
|
||||||
|
|
||||||
self.add_to_queue_btn = IconButton(
|
self.add_to_queue_btn = IconButton(
|
||||||
"go-jump-symbolic",
|
"queue-back-symbolic",
|
||||||
"Add all the songs in this album to the end of the play queue",
|
"Add all the songs in this album to the end of the play queue",
|
||||||
sensitive=False,
|
sensitive=False,
|
||||||
)
|
)
|
||||||
|
3
sublime/ui/icons/chromecast-symbolic.svg
Normal file
3
sublime/ui/icons/chromecast-symbolic.svg
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
<svg width="24" height="24" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M1 18v3h3c0-1.66-1.34-3-3-3zm0-4v2c2.76 0 5 2.24 5 5h2c0-3.87-3.13-7-7-7zm0-4v2a9 9 0 019 9h2c0-6.08-4.93-11-11-11zm20-7H3c-1.1 0-2 .9-2 2v3h2V5h18v14h-7v2h7c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z" fill="#000"/>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 288 B |
1
sublime/ui/icons/queue-back-symbolic.svg
Normal file
1
sublime/ui/icons/queue-back-symbolic.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path d="M1 1v2.8h14V1zm0 3.813V8.98a3.256 3.256 0 003.241 3.242h1.33l-1.187 1.186a1.01 1.01 0 00-.287.666V15h.926c.287 0 .511-.084.694-.26l3.386-3.444-3.386-3.444c-.183-.176-.407-.26-.694-.26h-.926v.925c0 .238.12.49.289.666l1.185 1.187H4.24c-.778 0-1.389-.612-1.389-1.39V4.813zM10.124 6.6v2.8H15V6.6zm0 5.6V15H15v-2.8z"/></svg>
|
After Width: | Height: | Size: 392 B |
1
sublime/ui/icons/queue-front-symbolic.svg
Normal file
1
sublime/ui/icons/queue-front-symbolic.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path d="M1 15v-2.8h14V15zm0-3.813V7.02a3.256 3.256 0 013.241-3.242h1.33L4.384 2.592a1.01 1.01 0 01-.287-.666V1h.926c.287 0 .511.084.694.26l3.386 3.444-3.386 3.444c-.183.176-.407.26-.694.26h-.926v-.925c0-.238.12-.49.289-.666L5.571 5.63H4.24c-.778 0-1.389.612-1.389 1.39v4.167zM10.124 9.4V6.6H15v2.8zm0-5.6V1H15v2.8z"/></svg>
|
After Width: | Height: | Size: 388 B |
@@ -233,13 +233,38 @@ class MainWindow(Gtk.ApplicationWindow):
|
|||||||
|
|
||||||
def _create_downloads_popover(self) -> Gtk.PopoverMenu:
|
def _create_downloads_popover(self) -> Gtk.PopoverMenu:
|
||||||
menu = Gtk.PopoverMenu()
|
menu = Gtk.PopoverMenu()
|
||||||
vbox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, name="main-menu-box")
|
vbox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, name="downloads-menu")
|
||||||
|
|
||||||
download_settings = Gtk.ModelButton(
|
vbox.add(self._create_label("<b>Current Downloads</b>", name="menu-label"))
|
||||||
|
|
||||||
|
clear_cache = Gtk.ModelButton(
|
||||||
text="Clear Cache", menu_name="clear-cache", name="menu-item-clear-cache",
|
text="Clear Cache", menu_name="clear-cache", name="menu-item-clear-cache",
|
||||||
)
|
)
|
||||||
download_settings.get_style_context().add_class("menu-button")
|
clear_cache.get_style_context().add_class("menu-button")
|
||||||
vbox.add(download_settings)
|
vbox.add(clear_cache)
|
||||||
|
|
||||||
|
# Create the "Add song(s) to playlist" sub-menu.
|
||||||
|
clear_cache_options = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
|
||||||
|
|
||||||
|
# Back button
|
||||||
|
clear_cache_options.add(
|
||||||
|
Gtk.ModelButton(inverted=True, centered=True, menu_name="main")
|
||||||
|
)
|
||||||
|
|
||||||
|
# Clear Song File Cache
|
||||||
|
menu_items = [
|
||||||
|
("Clear Song File Cache", lambda _: print("clear song file cache")),
|
||||||
|
("Clear Metadata Cache", lambda _: print("clear metadata cache")),
|
||||||
|
("Clear Entire Cache", lambda _: print("clear entire cache")),
|
||||||
|
]
|
||||||
|
for text, clicked_fn in menu_items:
|
||||||
|
clear_song_cache = Gtk.ModelButton(text=text)
|
||||||
|
clear_song_cache.get_style_context().add_class("menu-button")
|
||||||
|
clear_song_cache.connect("clicked", clicked_fn)
|
||||||
|
clear_cache_options.pack_start(clear_song_cache, False, True, 0)
|
||||||
|
|
||||||
|
menu.add(clear_cache_options)
|
||||||
|
menu.child_set_property(clear_cache_options, "submenu", "clear-cache")
|
||||||
|
|
||||||
menu.add(vbox)
|
menu.add(vbox)
|
||||||
return menu
|
return menu
|
||||||
|
@@ -609,7 +609,7 @@ class PlayerControls(Gtk.ActionBar):
|
|||||||
|
|
||||||
# Device button (for chromecast)
|
# Device button (for chromecast)
|
||||||
self.device_button = IconButton(
|
self.device_button = IconButton(
|
||||||
"video-display-symbolic",
|
"chromecast-symbolic",
|
||||||
"Show available audio output devices",
|
"Show available audio output devices",
|
||||||
icon_size=Gtk.IconSize.LARGE_TOOLBAR,
|
icon_size=Gtk.IconSize.LARGE_TOOLBAR,
|
||||||
)
|
)
|
||||||
|
Reference in New Issue
Block a user