mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-30 16:02:00 +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:
23
src/controls.js
vendored
23
src/controls.js
vendored
@@ -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())
|
||||
|
Reference in New Issue
Block a user