[sushi/wip/cosimoc/no-clutter: 41/50] Make renderers control whether they can resize or not
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sushi/wip/cosimoc/no-clutter: 41/50] Make renderers control whether they can resize or not
- Date: Mon, 17 Jun 2019 18:36:03 +0000 (UTC)
commit 8d92075a761bdcefc1deaec7338f5f4170ef6703
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Sat Jun 15 12:19:35 2019 -0700
Make renderers control whether they can resize or not
The audio and fallback renderers are made not resizable.
src/ui/fallbackRenderer.js | 4 ++++
src/ui/mainWindow.js | 2 ++
src/ui/renderer.js | 4 ++++
src/viewers/audio.js | 4 ++++
4 files changed, 14 insertions(+)
---
diff --git a/src/ui/fallbackRenderer.js b/src/ui/fallbackRenderer.js
index ca6fd8a..9503649 100644
--- a/src/ui/fallbackRenderer.js
+++ b/src/ui/fallbackRenderer.js
@@ -155,6 +155,10 @@ var FallbackRenderer = GObject.registerClass({
}
}
+ get resizable() {
+ return false;
+ }
+
get resizePolicy() {
return Renderer.ResizePolicy.NAT_SIZE;
}
diff --git a/src/ui/mainWindow.js b/src/ui/mainWindow.js
index 93df039..a74f49d 100644
--- a/src/ui/mainWindow.js
+++ b/src/ui/mainWindow.js
@@ -217,6 +217,8 @@ var MainWindow = GObject.registerClass(class MainWindow extends Gtk.Window {
this._renderer.connect('notify::ready', this._onRendererReady.bind(this));
this._onRendererReady();
+
+ this.set_resizable(this._renderer.resizable);
}
/**************************************************************************
diff --git a/src/ui/renderer.js b/src/ui/renderer.js
index adfe17d..269974c 100644
--- a/src/ui/renderer.js
+++ b/src/ui/renderer.js
@@ -24,6 +24,10 @@ var Renderer = GObject.registerClass({
return !!this._ready;
}
+ get resizable() {
+ return true;
+ }
+
get resizePolicy() {
return ResizePolicy.MAX_SIZE;
}
diff --git a/src/viewers/audio.js b/src/viewers/audio.js
index 954519e..118e7d5 100644
--- a/src/viewers/audio.js
+++ b/src/viewers/audio.js
@@ -233,6 +233,10 @@ var Klass = GObject.registerClass({
}
}
+ get resizable() {
+ return false;
+ }
+
get resizePolicy() {
return Renderer.ResizePolicy.NAT_SIZE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]