Files
clapper/src/headerbar.js
Rafał Dzięgiel 5018b3a28a Use new PiP icons when available
Use the new "pip-in" and "pip-out" GNOME symbolic icons if user theme has them for enter/leave floating mode button. When icon is unavailable on the host, old icon will be used instead.
2021-06-23 14:24:59 +02:00

30 lines
722 B
JavaScript

const { GObject } = imports.gi;
const { HeaderBarBase } = imports.src.headerbarBase;
var HeaderBar = GObject.registerClass(
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();
}
});