Use new PiP icons when available

Use the new "pip-in" and "pip-out" GNOME symbolic icons if user theme has them for enter/leave floating mode button. When icon is unavailable on the host, old icon will be used instead.
This commit is contained in:
Rafał Dzięgiel
2021-06-23 14:24:59 +02:00
parent bad836cc6d
commit 5018b3a28a
3 changed files with 52 additions and 8 deletions

View File

@@ -9,17 +9,20 @@ class ClapperHeaderBar extends HeaderBarBase
this.activate_action(`window.${action}`, null);
}
_onFloatButtonClicked()
_onFloatButtonClicked(button)
{
const clapperWidget = this.root.child;
const { controlsRevealer } = clapperWidget;
clapperWidget.controlsRevealer.toggleReveal();
controlsRevealer.toggleReveal();
/* Reset timer to not disappear during click */
clapperWidget._setHideControlsTimeout();
this._updateFloatIcon(!controlsRevealer.reveal_child);
}
_onFullscreenButtonClicked()
_onFullscreenButtonClicked(button)
{
this.root.fullscreen();
}