mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-31 08:21:59 +02:00
Add PiP and play icons as gresource
Add missing PiP icons from web devel kit. Also add play/pause icons at the right size and remove all workarounds/scaling implemented or these two. Playback icons are always two bars for pause and triangle for play, so hopefully this will not be problematic, as this guaranties the right size for them that Adwaita unfortunately cannot provide.
This commit is contained in:
@@ -23,7 +23,6 @@ class ClapperHeaderBarBase extends Gtk.Box
|
||||
|
||||
this.isMaximized = false;
|
||||
this.isMenuOnLeft = true;
|
||||
this.hasPipIcons = false;
|
||||
|
||||
const uiBuilder = Misc.getBuilderForName('clapper.ui');
|
||||
|
||||
@@ -53,7 +52,7 @@ class ClapperHeaderBarBase extends Gtk.Box
|
||||
this.extraButtonsBox.add_css_class('linked');
|
||||
|
||||
const floatButton = new Gtk.Button({
|
||||
icon_name: 'go-bottom-symbolic',
|
||||
icon_name: 'pip-in-symbolic',
|
||||
can_focus: false,
|
||||
});
|
||||
floatButton.add_css_class('osd');
|
||||
@@ -221,9 +220,7 @@ class ClapperHeaderBarBase extends Gtk.Box
|
||||
const floatButton = this.extraButtonsBox.get_first_child();
|
||||
if(!floatButton) return;
|
||||
|
||||
const iconName = (!this.hasPipIcons)
|
||||
? 'go-bottom-symbolic'
|
||||
: (isFloating)
|
||||
const iconName = (isFloating)
|
||||
? 'pip-out-symbolic'
|
||||
: 'pip-in-symbolic';
|
||||
|
||||
@@ -242,15 +239,6 @@ class ClapperHeaderBarBase extends Gtk.Box
|
||||
_onFullscreenButtonClicked(button)
|
||||
{
|
||||
}
|
||||
|
||||
_onIconThemeChanged(iconTheme)
|
||||
{
|
||||
/* Those icons are new, so check if theme has them */
|
||||
this.hasPipIcons = (
|
||||
iconTheme.has_icon('pip-in-symbolic')
|
||||
&& iconTheme.has_icon('pip-out-symbolic')
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
var HeaderBarPopover = GObject.registerClass({
|
||||
|
Reference in New Issue
Block a user