mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-30 07:42:23 +02:00
Remove old floating mode leftovers
Clapper has now much simpler floating mode. This overcomplicated code is not needed anymore.
This commit is contained in:
@@ -18,11 +18,7 @@ class ClapperCustomButton extends Gtk.Button
|
||||
|
||||
super._init(opts);
|
||||
|
||||
this.floatUnaffected = false;
|
||||
this.wantedVisible = true;
|
||||
this.isFullscreen = false;
|
||||
this.isFloating = false;
|
||||
|
||||
this.add_css_class('flat');
|
||||
}
|
||||
|
||||
@@ -43,32 +39,6 @@ class ClapperCustomButton extends Gtk.Button
|
||||
this.isFullscreen = isFullscreen;
|
||||
}
|
||||
|
||||
setFloatingMode(isFloating)
|
||||
{
|
||||
if(this.isFloating === isFloating)
|
||||
return;
|
||||
|
||||
this.isFloating = isFloating;
|
||||
|
||||
if(this.floatUnaffected)
|
||||
return;
|
||||
|
||||
if(isFloating)
|
||||
super.set_visible(false);
|
||||
else
|
||||
super.set_visible(this.wantedVisible);
|
||||
}
|
||||
|
||||
set_visible(isVisible)
|
||||
{
|
||||
this.wantedVisible = isVisible;
|
||||
|
||||
if(this.isFloating && !this.floatUnaffected)
|
||||
super.set_visible(false);
|
||||
else
|
||||
super.set_visible(isVisible);
|
||||
}
|
||||
|
||||
vfunc_clicked()
|
||||
{
|
||||
if(!this.isFullscreen)
|
||||
@@ -79,24 +49,14 @@ class ClapperCustomButton extends Gtk.Button
|
||||
}
|
||||
});
|
||||
|
||||
var IconButton = GObject.registerClass(
|
||||
class ClapperIconButton extends CustomButton
|
||||
{
|
||||
_init(icon)
|
||||
{
|
||||
super._init({
|
||||
icon_name: icon,
|
||||
});
|
||||
this.floatUnaffected = true;
|
||||
}
|
||||
});
|
||||
|
||||
var IconToggleButton = GObject.registerClass(
|
||||
class ClapperIconToggleButton extends IconButton
|
||||
class ClapperIconToggleButton extends CustomButton
|
||||
{
|
||||
_init(primaryIcon, secondaryIcon)
|
||||
{
|
||||
super._init(primaryIcon);
|
||||
super._init({
|
||||
icon_name: primaryIcon,
|
||||
});
|
||||
|
||||
this.primaryIcon = primaryIcon;
|
||||
this.secondaryIcon = secondaryIcon;
|
||||
|
Reference in New Issue
Block a user