Files
clapper/clapper_src/headerbar.js
Rafostar 083445a830 Split header bar source file into two
This allows creating another headerbar with different functionality from the same source code.
2020-12-11 15:22:35 +01:00

29 lines
692 B
JavaScript

const { GObject } = imports.gi;
const { HeaderBarBase } = imports.clapper_src.headerbarBase;
var HeaderBar = GObject.registerClass(
class ClapperHeaderBar extends HeaderBarBase
{
_init(window)
{
super._init(window);
let clapperWidget = window.get_child();
clapperWidget.controls.unfloatButton.bind_property('visible', this, 'visible',
GObject.BindingFlags.INVERT_BOOLEAN
);
}
_onFloatButtonClicked()
{
let clapperWidget = this.get_prev_sibling();
clapperWidget.setFloatingMode(true);
}
_onFullscreenButtonClicked()
{
let window = this.get_parent();
window.fullscreen();
}
});