From a0ec4302eaf0300e24df3ead882619d44c0eaa65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anax=C3=ADmeno=20Brito?= Date: Tue, 11 Jun 2024 01:09:59 -0100 Subject: [PATCH] c-eyes@anaximeno: Version 2.1.2 (#6075) * Fix unintentional deactivation on monitors changed * Improve padding settings --- .../files/c-eyes@anaximeno/6.2/applet.js | 14 ++++++++++---- .../files/c-eyes@anaximeno/6.2/eyeModes.js | 2 +- .../c-eyes@anaximeno/6.2/settings-schema.json | 6 +++--- .../files/c-eyes@anaximeno/metadata.json | 2 +- 4 files changed, 15 insertions(+), 9 deletions(-) diff --git a/c-eyes@anaximeno/files/c-eyes@anaximeno/6.2/applet.js b/c-eyes@anaximeno/files/c-eyes@anaximeno/6.2/applet.js index 96d91f4da66..9a0bad16e5f 100644 --- a/c-eyes@anaximeno/files/c-eyes@anaximeno/6.2/applet.js +++ b/c-eyes@anaximeno/files/c-eyes@anaximeno/6.2/applet.js @@ -48,6 +48,7 @@ class Eye extends Applet.Applet { this.orientation = orientation; this.metadata = metadata; this.area_width = areaWidth; + this.instance_id = instanceId; this.setAllowedLayout(Applet.AllowedLayout.BOTH); @@ -130,7 +131,7 @@ class Eye extends Applet.Applet { { key: "deactivate-on-fullscreen", value: "deactivate_on_fullscreen", - cb: null, + cb: this.on_fullscreen_changed, }, { key: "use-alternative-colors", @@ -193,8 +194,10 @@ class Eye extends Applet.Applet { panelIsInCurrentMonitor = panelsInMonitor.includes(this.panel); } - if (this.deactivate_on_fullscreen) { - this.set_active(!monitorIsInFullscreen && panelIsInCurrentMonitor); + if (this.deactivate_on_fullscreen && panelIsInCurrentMonitor) { + this.set_active(!monitorIsInFullscreen); + } else { + this.set_active(true); } } @@ -205,7 +208,7 @@ class Eye extends Applet.Applet { } on_eye_mode_update() { - if (this.eye_painter && this.eye_painter.mode != this.mode) { + if (!this.eye_painter || this.eye_painter.mode != this.mode) { this.eye_painter = EyeModeFactory.createEyeMode(this.mode); } } @@ -253,6 +256,9 @@ class Eye extends Applet.Applet { this.area.queue_repaint(); } + + let status = enabled ? "enabled" : "disabled"; + global.log(UUID, `Eye/${this.instance_id} was ${status}!`); } update_tooltip() { diff --git a/c-eyes@anaximeno/files/c-eyes@anaximeno/6.2/eyeModes.js b/c-eyes@anaximeno/files/c-eyes@anaximeno/6.2/eyeModes.js index 03383e70f1a..0c53c55c520 100644 --- a/c-eyes@anaximeno/files/c-eyes@anaximeno/6.2/eyeModes.js +++ b/c-eyes@anaximeno/files/c-eyes@anaximeno/6.2/eyeModes.js @@ -165,7 +165,7 @@ class BulbMode extends EyeMode { const mouse_ang = Math.atan2(mouse_y, mouse_x); let [top_size, lat_size] = this.topAndLatSizes(area_width, area_height, options); - let eye_rad = (top_size - options.padding) / 2.3; + let eye_rad = (top_size - options.padding) / 2; if (2 * eye_rad > lat_size) eye_rad = lat_size / 2; const iris_rad = eye_rad * 0.6; diff --git a/c-eyes@anaximeno/files/c-eyes@anaximeno/6.2/settings-schema.json b/c-eyes@anaximeno/files/c-eyes@anaximeno/6.2/settings-schema.json index 6ec6ea7618e..74cbb2439ce 100644 --- a/c-eyes@anaximeno/files/c-eyes@anaximeno/6.2/settings-schema.json +++ b/c-eyes@anaximeno/files/c-eyes@anaximeno/6.2/settings-schema.json @@ -34,9 +34,9 @@ "padding": { "type": "spinbutton", "default": 4.0, - "min": 0.0, - "max": 32.0, - "step": 0.5, + "min": 0, + "max": 32, + "step": 2, "units": "px", "description": "Padding" }, diff --git a/c-eyes@anaximeno/files/c-eyes@anaximeno/metadata.json b/c-eyes@anaximeno/files/c-eyes@anaximeno/metadata.json index c2edb47a560..fe41fb0f7b7 100644 --- a/c-eyes@anaximeno/files/c-eyes@anaximeno/metadata.json +++ b/c-eyes@anaximeno/files/c-eyes@anaximeno/metadata.json @@ -1,5 +1,5 @@ { - "version": "2.1.1", + "version": "2.1.2", "uuid": "c-eyes@anaximeno", "name": "Cinnamon Eyes", "multiversion": true,