mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-30 16:02:00 +02:00
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.
32 lines
761 B
JavaScript
32 lines
761 B
JavaScript
const { GObject } = imports.gi;
|
|
const { HeaderBarBase } = imports.src.headerbarBase;
|
|
|
|
var HeaderBar = GObject.registerClass({
|
|
GTypeName: 'ClapperHeaderBar',
|
|
},
|
|
class ClapperHeaderBar extends HeaderBarBase
|
|
{
|
|
_onWindowButtonActivate(action)
|
|
{
|
|
this.activate_action(`window.${action}`, null);
|
|
}
|
|
|
|
_onFloatButtonClicked(button)
|
|
{
|
|
const clapperWidget = this.root.child;
|
|
const { controlsRevealer } = clapperWidget;
|
|
|
|
controlsRevealer.toggleReveal();
|
|
|
|
/* Reset timer to not disappear during click */
|
|
clapperWidget._setHideControlsTimeout();
|
|
|
|
this._updateFloatIcon(!controlsRevealer.reveal_child);
|
|
}
|
|
|
|
_onFullscreenButtonClicked(button)
|
|
{
|
|
this.root.fullscreen();
|
|
}
|
|
});
|