Remove old floating mode leftovers

Clapper has now much simpler floating mode. This overcomplicated code is not needed anymore.
This commit is contained in:
Rafał Dzięgiel
2021-02-13 20:19:08 +01:00
parent 892e8b55f3
commit 8064bab6a2
7 changed files with 11 additions and 206 deletions

23
src/controls.js vendored
View File

@@ -47,7 +47,6 @@ class ClapperControls extends Gtk.Box
'go-previous-symbolic',
'go-next-symbolic'
);
revealTracksButton.floatUnaffected = false;
revealTracksButton.add_css_class('narrowbutton');
this.buttonsArr.push(revealTracksButton);
const tracksRevealer = new Revealers.ButtonsRevealer(
@@ -90,12 +89,6 @@ class ClapperControls extends Gtk.Box
this.unfullscreenButton.connect('clicked', this._onUnfullscreenClicked.bind(this));
this.unfullscreenButton.set_visible(false);
this.unfloatButton = this.addButton(
'preferences-desktop-remote-desktop-symbolic'
);
this.unfloatButton.connect('clicked', this._onUnfloatClicked.bind(this));
this.unfloatButton.set_visible(false);
const keyController = new Gtk.EventControllerKey();
keyController.connect('key-pressed', this._onControlsKeyPressed.bind(this));
keyController.connect('key-released', this._onControlsKeyReleased.bind(this));
@@ -117,14 +110,6 @@ class ClapperControls extends Gtk.Box
this.set_can_focus(isFullscreen);
}
setFloatingMode(isFloating)
{
this.isMobile = null;
for(let button of this.buttonsArr)
button.setFloatingMode(isFloating);
}
setLiveMode(isLive, isSeekable)
{
if(isLive)
@@ -147,7 +132,7 @@ class ClapperControls extends Gtk.Box
{
const button = (buttonIcon instanceof Gtk.Button)
? buttonIcon
: new Buttons.IconButton(buttonIcon);
: new Buttons.CustomButton({ icon_name: buttonIcon });
if(!revealer)
this.append(button);
@@ -528,12 +513,6 @@ class ClapperControls extends Gtk.Box
root.unfullscreen();
}
_onUnfloatClicked(button)
{
const clapperWidget = this.get_ancestor(Gtk.Grid);
clapperWidget.setFloatingMode(false);
}
_onCheckButtonToggled(checkButton)
{
if(!checkButton.get_active())