mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-30 07:42:23 +02:00
Make floating window update its title earlier
Instead of waiting till animation finishes, update the window title right away when changing modes
This commit is contained in:
@@ -321,21 +321,21 @@ class ClapperControlsRevealer extends Gtk.Revealer
|
||||
|
||||
const isStick = (isFloating && settings.get_boolean('floating-stick'));
|
||||
DBus.shellWindowEval('stick', isStick);
|
||||
|
||||
this.root.child.refreshWindowTitle(this.root.title);
|
||||
}
|
||||
|
||||
_onControlsRevealed()
|
||||
{
|
||||
if(this.child_revealed) {
|
||||
const clapperWidget = this.root.child;
|
||||
if(!clapperWidget) return;
|
||||
|
||||
if(this.child_revealed) {
|
||||
const [width, height] = this.root.get_default_size();
|
||||
|
||||
clapperWidget.player.widget.height_request = -1;
|
||||
this.root.set_default_size(width, height);
|
||||
}
|
||||
|
||||
clapperWidget.refreshWindowTitle(this.root.title);
|
||||
}
|
||||
|
||||
_onUnrevealTick(playerWidget, width, height)
|
||||
|
@@ -326,7 +326,7 @@ class ClapperWidget extends Gtk.Grid
|
||||
|
||||
refreshWindowTitle(title)
|
||||
{
|
||||
const isFloating = !this.controlsRevealer.child_revealed;
|
||||
const isFloating = !this.controlsRevealer.reveal_child;
|
||||
const pipSuffix = ' - PiP';
|
||||
const hasPipSuffix = title.endsWith(pipSuffix);
|
||||
|
||||
|
Reference in New Issue
Block a user