Files
clapper/src/headerbar.js
2021-02-22 10:22:05 +01:00

34 lines
728 B
JavaScript

const { GObject, Gtk } = imports.gi;
const { HeaderBarBase } = imports.src.headerbarBase;
var HeaderBar = GObject.registerClass(
class ClapperHeaderBar extends HeaderBarBase
{
_init()
{
super._init();
this.add_css_class('osd');
this.add_css_class('osdheaderbar');
}
_onWindowButtonActivate(action)
{
this.activate_action(action, null);
}
_onFloatButtonClicked()
{
const clapperWidget = this.root.child;
clapperWidget.controlsRevealer.toggleReveal();
/* Reset timer to not disappear during click */
clapperWidget._setHideControlsTimeout();
}
_onFullscreenButtonClicked()
{
this.root.fullscreen();
}
});