mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-31 00:11:59 +02:00
Move "clapper_src" dir to "src"
The "clapper_src" directory name was unusual. This was done to make it work as a widget for other apps. Now that this functionality got removed it can be named simply "src" as recommended by guidelines.
This commit is contained in:
28
src/headerbar.js
Normal file
28
src/headerbar.js
Normal file
@@ -0,0 +1,28 @@
|
||||
const { GObject } = imports.gi;
|
||||
const { HeaderBarBase } = imports.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();
|
||||
}
|
||||
});
|
Reference in New Issue
Block a user