Skip to content

Commit

Permalink
Fixed style errors
Browse files Browse the repository at this point in the history
  • Loading branch information
sergio-costas committed Mar 1, 2024
1 parent 71773f5 commit 77ffa18
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 26 deletions.
36 changes: 18 additions & 18 deletions appIconIndicators.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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();
}

Expand All @@ -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();
Expand All @@ -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();
}
}
Expand All @@ -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++) {
Expand All @@ -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();
}
}
Expand All @@ -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();
}
}
Expand All @@ -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),
Expand All @@ -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();
}
}
Expand All @@ -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),
Expand All @@ -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();
}
}
Expand Down Expand Up @@ -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();
Expand All @@ -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();
Expand All @@ -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++) {
Expand All @@ -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();
}
}
Expand Down
14 changes: 7 additions & 7 deletions theming.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 77ffa18

Please sign in to comment.