Make remote app minimize, maximize and close buttons affect Clapper

This commit is contained in:
Rafał Dzięgiel
2021-02-23 11:56:02 +01:00
parent 6950cf1bbb
commit a309ef6099
6 changed files with 46 additions and 18 deletions

View File

@@ -17,6 +17,8 @@ class ClapperHeaderBarBase extends Gtk.Box
margin_start: 6,
margin_end: 6,
});
this.add_css_class('osd');
this.add_css_class('osdheaderbar');
this.isMaximized = false;
this.isMenuOnLeft = true;
@@ -197,12 +199,11 @@ class ClapperHeaderBarBase extends Gtk.Box
});
button.add_css_class('circular');
const action = (name === 'maximize')
? 'window.toggle-maximized'
: 'window.' + name;
if(name === 'maximize')
name = 'toggle-maximized';
button.connect('clicked',
this._onWindowButtonActivate.bind(this, action)
this._onWindowButtonActivate.bind(this, name)
);
return button;