mirror of
https://github.com/Rafostar/clapper.git
synced 2025-09-01 00:41:58 +02:00
Append "PiP" suffix to window title when in floating mode
We are gonna take advantage of this simple change elsewhere
This commit is contained in:
@@ -319,11 +319,24 @@ class ClapperWidget extends Gtk.Grid
|
||||
title = item.filename;
|
||||
}
|
||||
|
||||
this.root.title = title;
|
||||
this.refreshWindowTitle(title);
|
||||
this.revealerTop.title = title;
|
||||
this.revealerTop.showTitle = true;
|
||||
}
|
||||
|
||||
refreshWindowTitle(title)
|
||||
{
|
||||
const isFloating = !this.controlsRevealer.child_revealed;
|
||||
const pipSuffix = ' - PiP';
|
||||
const hasPipSuffix = title.endsWith(pipSuffix);
|
||||
|
||||
this.root.title = (isFloating && !hasPipSuffix)
|
||||
? title + pipSuffix
|
||||
: (!isFloating && hasPipSuffix)
|
||||
? title.substring(0, title.length - pipSuffix.length)
|
||||
: title;
|
||||
}
|
||||
|
||||
updateTime()
|
||||
{
|
||||
if(
|
||||
|
Reference in New Issue
Block a user