From 77ffa18f60e58a9593363f3b67a8daeee44f5722 Mon Sep 17 00:00:00 2001 From: Sergio Costas Rodriguez Date: Fri, 1 Mar 2024 13:30:07 +0100 Subject: [PATCH] Fixed style errors --- appIconIndicators.js | 36 ++++++++++++++++++------------------ theming.js | 14 +++++++------- utils.js | 2 +- 3 files changed, 26 insertions(+), 26 deletions(-) diff --git a/appIconIndicators.js b/appIconIndicators.js index cfea08732..1ab01a5c2 100644 --- a/appIconIndicators.js +++ b/appIconIndicators.js @@ -407,7 +407,7 @@ class RunningIndicatorDots extends RunningIndicatorBase { const n = this._number; cr.setLineWidth(this._borderWidth); - Utils.cairo_set_source_color(cr, this._borderColor); + Utils.cairoSetSourceColor(cr, this._borderColor); // draw for the bottom case: cr.translate( @@ -422,7 +422,7 @@ class RunningIndicatorDots extends RunningIndicatorBase { } cr.strokePreserve(); - Utils.cairo_set_source_color(cr, this._bodyColor); + Utils.cairoSetSourceColor(cr, this._bodyColor); cr.fill(); } @@ -448,7 +448,7 @@ class RunningIndicatorCiliora extends RunningIndicatorDots { const yOffset = this._height - padding - size; cr.setLineWidth(this._borderWidth); - Utils.cairo_set_source_color(cr, this._borderColor); + Utils.cairoSetSourceColor(cr, this._borderColor); cr.translate(0, yOffset); cr.newSubPath(); @@ -459,7 +459,7 @@ class RunningIndicatorCiliora extends RunningIndicatorDots { } cr.strokePreserve(); - Utils.cairo_set_source_color(cr, this._bodyColor); + Utils.cairoSetSourceColor(cr, this._bodyColor); cr.fill(); } } @@ -481,7 +481,7 @@ class RunningIndicatorSegmented extends RunningIndicatorDots { const yOffset = this._height - padding - size; cr.setLineWidth(this._borderWidth); - Utils.cairo_set_source_color(cr, this._borderColor); + Utils.cairoSetSourceColor(cr, this._borderColor); cr.translate(0, yOffset); for (let i = 0; i < this._number; i++) { @@ -490,7 +490,7 @@ class RunningIndicatorSegmented extends RunningIndicatorDots { } cr.strokePreserve(); - Utils.cairo_set_source_color(cr, this._bodyColor); + Utils.cairoSetSourceColor(cr, this._bodyColor); cr.fill(); } } @@ -510,14 +510,14 @@ class RunningIndicatorSolid extends RunningIndicatorDots { const yOffset = this._height - padding - size; cr.setLineWidth(this._borderWidth); - Utils.cairo_set_source_color(cr, this._borderColor); + Utils.cairoSetSourceColor(cr, this._borderColor); cr.translate(0, yOffset); cr.newSubPath(); cr.rectangle(0, 0, this._width, size); cr.strokePreserve(); - Utils.cairo_set_source_color(cr, this._bodyColor); + Utils.cairoSetSourceColor(cr, this._bodyColor); cr.fill(); } } @@ -534,7 +534,7 @@ class RunningIndicatorSquares extends RunningIndicatorDots { const yOffset = this._height - padding - size; cr.setLineWidth(this._borderWidth); - Utils.cairo_set_source_color(cr, this._borderColor); + Utils.cairoSetSourceColor(cr, this._borderColor); cr.translate( Math.floor((this._width - this._number * size - (this._number - 1) * spacing) / 2), @@ -545,7 +545,7 @@ class RunningIndicatorSquares extends RunningIndicatorDots { cr.rectangle(i * size + i * spacing, 0, size, size); } cr.strokePreserve(); - Utils.cairo_set_source_color(cr, this._bodyColor); + Utils.cairoSetSourceColor(cr, this._bodyColor); cr.fill(); } } @@ -563,7 +563,7 @@ class RunningIndicatorDashes extends RunningIndicatorDots { const yOffset = this._height - padding - size; cr.setLineWidth(this._borderWidth); - Utils.cairo_set_source_color(cr, this._borderColor); + Utils.cairoSetSourceColor(cr, this._borderColor); cr.translate( Math.floor((this._width - this._number * dashLength - (this._number - 1) * spacing) / 2), @@ -575,7 +575,7 @@ class RunningIndicatorDashes extends RunningIndicatorDots { } cr.strokePreserve(); - Utils.cairo_set_source_color(cr, this._bodyColor); + Utils.cairoSetSourceColor(cr, this._bodyColor); cr.fill(); } } @@ -607,7 +607,7 @@ class RunningIndicatorMetro extends RunningIndicatorDots { const n = this._number; if (n <= 1) { cr.translate(0, yOffset); - Utils.cairo_set_source_color(cr, this._bodyColor); + Utils.cairoSetSourceColor(cr, this._bodyColor); cr.newSubPath(); cr.rectangle(0, 0, this._width, size); cr.fill(); @@ -621,15 +621,15 @@ class RunningIndicatorMetro extends RunningIndicatorDots { cr.translate(0, yOffset); - Utils.cairo_set_source_color(cr, this._bodyColor); + Utils.cairoSetSourceColor(cr, this._bodyColor); cr.newSubPath(); cr.rectangle(0, 0, this._width - darkenedLength - blackenedLength, size); cr.fill(); - Utils.cairo_set_source_color(cr, blackenedColor); + Utils.cairoSetSourceColor(cr, blackenedColor); cr.newSubPath(); cr.rectangle(this._width - darkenedLength - blackenedLength, 0, 1, size); cr.fill(); - Utils.cairo_set_source_color(cr, darkenedColor); + Utils.cairoSetSourceColor(cr, darkenedColor); cr.newSubPath(); cr.rectangle(this._width - darkenedLength, 0, darkenedLength, size); cr.fill(); @@ -650,7 +650,7 @@ class RunningIndicatorBinary extends RunningIndicatorDots { const binaryValue = String(`0000${(n >>> 0).toString(2)}`).slice(-4); cr.setLineWidth(this._borderWidth); - Utils.cairo_set_source_color(cr, this._borderColor); + Utils.cairoSetSourceColor(cr, this._borderColor); cr.translate(Math.floor((this._width - 4 * size - (4 - 1) * spacing) / 2), yOffset); for (let i = 0; i < binaryValue.length; i++) { @@ -667,7 +667,7 @@ class RunningIndicatorBinary extends RunningIndicatorDots { } } cr.strokePreserve(); - Utils.cairo_set_source_color(cr, this._bodyColor); + Utils.cairoSetSourceColor(cr, this._bodyColor); cr.fill(); } } diff --git a/theming.js b/theming.js index c9bf2fd2a..87471a35c 100644 --- a/theming.js +++ b/theming.js @@ -354,22 +354,22 @@ class Transparency { this._base_actor_style = ''; - let added_signal = "child-added"; - let removed_signal = "child-removed"; + let addedSignal = 'child-added'; + let removedSignal = 'child-removed'; // for compatibility with Gnome Shell 45 - if (GObject.signal_lookup("actor-added", global.window_group)) { - added_signal = "actor-added"; - removed_signal = "actor-removed"; + if (GObject.signal_lookup('actor-added', global.window_group)) { + addedSignal = 'actor-added'; + removedSignal = 'actor-removed'; } this._signalsHandler.addWithLabel(Labels.TRANSPARENCY, [ global.window_group, - added_signal, + addedSignal, this._onWindowActorAdded.bind(this), ], [ global.window_group, - removed_signal, + removedSignal, this._onWindowActorRemoved.bind(this), ], [ global.window_manager, diff --git a/utils.js b/utils.js index 35406d0ff..bc4eb7705 100644 --- a/utils.js +++ b/utils.js @@ -666,7 +666,7 @@ export function laterRemove(id) { * @param {*} cr A cairo context * @param {*} sourceColor The new color for source */ -export function cairo_set_source_color(cr, sourceColor) { +export function cairoSetSourceColor(cr, sourceColor) { if (Clutter.cairo_set_source_color) Clutter.cairo_set_source_color(cr, sourceColor); else