Skip to content

Commit 12cea1e

Browse files
authored
brightness-and-gamma-applet v3.1.1: Added CSS file (#8298)
1 parent fb21ca7 commit 12cea1e

File tree

5 files changed

+20
-273
lines changed

5 files changed

+20
-273
lines changed

brightness-and-gamma-applet@cardsurf/files/brightness-and-gamma-applet@cardsurf/6.6/lib/appletGui.js

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,6 @@ class RadioMenuItem extends PopupMenu.PopupSubMenuMenuItem {
8989
this.set_option_style(option, css_style);
9090
}
9191

92-
set_font_weight(option_index, font_weight) {
93-
let css_style = "font-weight: " + font_weight + ";";
94-
let option = this.options[option_index];
95-
this.set_option_style(option, css_style);
96-
}
97-
9892
set_option_style(option, css_style) {
9993
option.label.set_style(css_style);
10094
}
@@ -256,7 +250,7 @@ class MenuSliders {
256250
this.applet.target_temperature === this.applet.screen_temp
257251
) {
258252
clearInterval(_interval);
259-
this.save_last_values();
253+
this.applet.save_last_values();
260254
}
261255
this.applet.brightness += Math.sign(this.applet.target_brightness - this.applet.brightness);
262256
let diff_temp = this.applet.target_temperature - this.applet.screen_temp;
@@ -302,7 +296,7 @@ class MenuSliders {
302296
this.applet.target_gamma_blue === this.applet.gamma_blue
303297
) {
304298
clearInterval(_interval);
305-
this.save_last_values();
299+
this.applet.save_last_values();
306300
}
307301

308302
this.applet.brightness += Math.sign(this.applet.target_brightness - this.applet.brightness);
@@ -347,12 +341,17 @@ class MenuSliders {
347341
}
348342

349343
_init_label(key, value) {
350-
let label = this.add_label(key, "");
351-
this.set_label_text(key, value);
344+
//~ let label = this.add_label(key, "");
345+
let label = this.add_label(key, this.get_description_text(key, value));
346+
//~ this.set_label_text(key, value);
352347
}
353348

354349
add_label(key, text){
355-
let label = new PopupMenu.PopupMenuItem(text, { reactive: false });
350+
let label = new PopupMenu.PopupMenuItem(text, { reactive: false, style_class: "label-monospace" });
351+
label.label.clutter_text.set_markup(text);
352+
let fontdesc = Pango.font_description_from_string('monospace');
353+
label.label.clutter_text.set_font_description(fontdesc);
354+
label.label.clutter_text.set_ellipsize(Pango.EllipsizeMode.NONE);
356355
this.menu.addMenuItem(label);
357356
this.labels[key] = label;
358357
return label;
@@ -365,6 +364,8 @@ class MenuSliders {
365364
let fontdesc = Pango.font_description_from_string('monospace');
366365
label.label.clutter_text.set_font_description(fontdesc);
367366
label.label.clutter_text.set_ellipsize(Pango.EllipsizeMode.NONE);
367+
368+
this.labels[key] = label;
368369
}
369370

370371
get_description_text(key, value) {

brightness-and-gamma-applet@cardsurf/files/brightness-and-gamma-applet@cardsurf/6.6/settings-schema (copie).json

Lines changed: 0 additions & 261 deletions
This file was deleted.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.label-monospace {
2+
font-family: monospace;
3+
}

brightness-and-gamma-applet@cardsurf/files/brightness-and-gamma-applet@cardsurf/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
### v3.1.1~20260209
2+
* Added CSS file stylesheet.css.
3+
* Fixes [#8297](https://github.com/linuxmint/cinnamon-spices-applets/issues/8297)
4+
15
### v3.1.0~20260205
26
* Corrects errors that occur when changing methods.
37
* Corrects errors due to translations.

brightness-and-gamma-applet@cardsurf/files/brightness-and-gamma-applet@cardsurf/metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"description": "Sets brightness and gamma levels of a screen",
3-
"version": "3.1.0",
3+
"version": "3.1.1",
44
"uuid": "brightness-and-gamma-applet@cardsurf",
55
"name": "Brightness and gamma applet",
66
"author": "claudiux"

0 commit comments

Comments
 (0)