Files
clapper/clapper_src/headerbar.js
Rafostar 3452990c28 Use "const" where possible
Increase readability by using "const" for identifiers that will not be reassigned
2021-01-05 20:13:53 +01:00

29 lines
698 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);
const clapperWidget = window.get_child();
clapperWidget.controls.unfloatButton.bind_property('visible', this, 'visible',
GObject.BindingFlags.INVERT_BOOLEAN
);
}
_onFloatButtonClicked()
{
const clapperWidget = this.get_prev_sibling();
clapperWidget.setFloatingMode(true);
}
_onFullscreenButtonClicked()
{
const window = this.get_parent();
window.fullscreen();
}
});