mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-29 23:32:04 +02:00
Remove workarounds for GTK 3.99.X versions
Clapper build scripts were updated to GTK 4.0.0 some time ago. Most distros either received GTK 4.0 from start or an update to it. No point in having a special workarounds to support 3.99.X versions.
This commit is contained in:
@@ -14,7 +14,6 @@ var settings = new Gio.Settings({
|
||||
});
|
||||
|
||||
var maxVolume = 1.5;
|
||||
var isOldGtk = (Gtk.MINOR_VERSION === 99 && Gtk.MICRO_VERSION <= 4);
|
||||
|
||||
let inhibitCookie;
|
||||
|
||||
|
@@ -372,9 +372,7 @@ class ClapperPlayer extends PlayerBase
|
||||
|
||||
const clapperWidget = this.widget.get_ancestor(Gtk.Grid);
|
||||
if(!clapperWidget.fullscreenMode) {
|
||||
const size = (Misc.isOldGtk)
|
||||
? window.get_size()
|
||||
: window.get_default_size();
|
||||
const size = window.get_default_size();
|
||||
|
||||
if(size[0] > 0 && size[1] > 0)
|
||||
clapperWidget._saveWindowSize(size);
|
||||
|
@@ -136,9 +136,7 @@ class ClapperWidget extends Gtk.Grid
|
||||
return;
|
||||
|
||||
const root = this.get_root();
|
||||
const size = (Misc.isOldGtk)
|
||||
? root.get_size()
|
||||
: root.get_default_size();
|
||||
const size = root.get_default_size();
|
||||
|
||||
this._saveWindowSize(size);
|
||||
|
||||
@@ -163,11 +161,7 @@ class ClapperWidget extends Gtk.Grid
|
||||
? this.floatSize
|
||||
: this.windowSize;
|
||||
|
||||
if(Misc.isOldGtk)
|
||||
root.resize(resize[0], resize[1]);
|
||||
else
|
||||
root.set_default_size(resize[0], resize[1]);
|
||||
|
||||
root.set_default_size(resize[0], resize[1]);
|
||||
debug(`resized window: ${resize[0]}x${resize[1]}`);
|
||||
|
||||
this.revealerBottom.showChild(false);
|
||||
|
Reference in New Issue
Block a user