Skip to content

Commit

Permalink
c-eyes@anaximeno: Version 2.1.2 (linuxmint#6075)
Browse files Browse the repository at this point in the history
* Fix unintentional deactivation on monitors changed

* Improve padding settings
  • Loading branch information
anaximeno authored Jun 11, 2024
1 parent e0729a9 commit a0ec430
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 9 deletions.
14 changes: 10 additions & 4 deletions c-eyes@anaximeno/files/c-eyes@anaximeno/6.2/applet.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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);
}
}

Expand All @@ -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);
}
}
Expand Down Expand Up @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion c-eyes@anaximeno/files/c-eyes@anaximeno/6.2/eyeModes.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
2 changes: 1 addition & 1 deletion c-eyes@anaximeno/files/c-eyes@anaximeno/metadata.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "2.1.1",
"version": "2.1.2",
"uuid": "c-eyes@anaximeno",
"name": "Cinnamon Eyes",
"multiversion": true,
Expand Down

0 comments on commit a0ec430

Please sign in to comment.