Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dual datetime@rcalixte: Feature suggestion: Add font weight #1285

Merged
merged 4 commits into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions dual-datetime@rcalixte/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@

### 1.3.0
* Add an option for font weight

### 1.2.1
* Update default time size to 5
* Update default date size to 2.5
Expand Down
3 changes: 2 additions & 1 deletion dual-datetime@rcalixte/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ Adjust the following options for each datetime value using the settings:

* Time Format
* Time Alignment (per Layout)
* Font
* Font Family
* Color
* Font Weight
* Size

Additional desklet options include:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,15 @@ DateTimeDesklet.prototype = {
this.settings.bindProperty(Settings.BindingDirection.IN, "time_yalign1", "time_yalign1", this.setupUI);
this.settings.bindProperty(Settings.BindingDirection.IN, "time_font1", "time_font1", this.on_font_setting_changed, 1);
this.settings.bindProperty(Settings.BindingDirection.IN, "time_color1", "time_color1", this.setupUI);
this.settings.bindProperty(Settings.BindingDirection.IN, "time_weight1", "time_weight1", this.on_font_setting_changed, 1);
this.settings.bindProperty(Settings.BindingDirection.IN, "time_size1", "time_size1", this.on_font_setting_changed, 1);
this.settings.bindProperty(Settings.BindingDirection.IN, "time_custom2", "time_custom2", this.setupUI);
this.settings.bindProperty(Settings.BindingDirection.IN, "time_format2", "time_format2", this.setupUI);
this.settings.bindProperty(Settings.BindingDirection.IN, "time_align2", "time_align2", this.setupUI);
this.settings.bindProperty(Settings.BindingDirection.IN, "time_yalign2", "time_yalign2", this.setupUI);
this.settings.bindProperty(Settings.BindingDirection.IN, "time_font2", "time_font2", this.on_font_setting_changed, 2);
this.settings.bindProperty(Settings.BindingDirection.IN, "time_color2", "time_color2", this.setupUI);
this.settings.bindProperty(Settings.BindingDirection.IN, "time_weight2", "time_weight2", this.on_font_setting_changed, 2);
this.settings.bindProperty(Settings.BindingDirection.IN, "time_size2", "time_size2", this.on_font_setting_changed, 2);
this.settings.bindProperty(Settings.BindingDirection.IN, "width", "width", this.setupUI);
this.settings.bindProperty(Settings.BindingDirection.IN, "title_align", "title_align", this.setupUI);
Expand Down Expand Up @@ -100,7 +102,7 @@ DateTimeDesklet.prototype = {
this[`time_font${num}`] = this[`time_font${num}`].replace(/['"`]/g, "");
this[`font${num}`] = this[`time_font${num}`] !== "" ? ` font-family: '${this["time_font" + num]}';` : "";
let _padding = this._vertical || num == 1 ? "" : "padding-left: 0.5em; ";
this[`container${num}`].style = `${_padding}color: ${this['time_color' + num]}; font-size: ${this['time_size' + num]}em;${this['font' + num]}`;
this[`container${num}`].style = `${_padding}color: ${this['time_color' + num]}; font-size: ${this['time_size' + num]}em; font-weight: ${this['time_weight' + num]};${this['font' + num]}`;
let _alignment = this._vertical ? { x_fill: false, x_align: ST_ALIGNMENT[this[`time_align${num}`]] } : null;
this._main.add(this[`container${num}`], _alignment);
},
Expand Down Expand Up @@ -161,7 +163,7 @@ DateTimeDesklet.prototype = {
global.logError(e);
} finally {
let _padding = this._vertical || num == 1 ? "" : "padding-left: 0.5em; ";
this[`container${num}`].style = `${_padding}color: ${this["time_color" + num]}; font-size: ${this["time_size" + num]}em;${this["font" + num]}`;
this[`container${num}`].style = `${_padding}color: ${this["time_color" + num]}; font-size: ${this["time_size" + num]}em; font-weight: ${this['time_weight' + num]};${this["font" + num]}`;
}
});
} catch (e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,16 @@
"tooltip": "RGB or RGBA",
"dependency": "time_custom1"
},
"time_weight1": {
"type": "scale",
"description": "Font Weight",
"default": 400,
"min": 100,
"max": 900,
"step": 100,
"tooltip": "Increase or decrease this value to change the font weight (Normal = 400, Bold = 700)",
"dependency": "time_custom1"
},
"time_size1": {
"type": "scale",
"description": "Font Size",
Expand Down Expand Up @@ -113,6 +123,16 @@
"tooltip": "RGB or RGBA",
"dependency": "time_custom2"
},
"time_weight2": {
"type": "scale",
"description": "Font Weight",
"default": 400,
"min": 100,
"max": 900,
"step": 100,
"tooltip": "Increase or decrease this value to change the font weight (Normal = 400, Bold = 700)",
"dependency": "time_custom2"
},
"time_size2": {
"type": "scale",
"description": "Font Size",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
],
"multiversion": true,
"max-instances": "10",
"version": "1.2.1"
"version": "1.3.0"
}
16 changes: 15 additions & 1 deletion dual-datetime@rcalixte/files/dual-datetime@rcalixte/po/ca.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgstr ""
"Project-Id-Version: dual-datetime@rcalixte 1.2.1\n"
"Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-desklets/"
"issues\n"
"POT-Creation-Date: 2024-08-06 22:34-0400\n"
"POT-Creation-Date: 2024-09-18 21:30-0400\n"
"PO-Revision-Date: 2024-05-15 13:58+0200\n"
"Last-Translator: Daniel <d3vf4n (at) tutanota (dot) com>\n"
"Language-Team: \n"
Expand Down Expand Up @@ -107,6 +107,20 @@ msgstr "Color de la lletra"
msgid "RGB or RGBA"
msgstr "RGB o RGBA"

#. 5.4->settings-schema.json->time_weight1->description
#. 5.4->settings-schema.json->time_weight2->description
#, fuzzy
msgid "Font Weight"
msgstr "Mida de la lletra"

#. 5.4->settings-schema.json->time_weight1->tooltip
#. 5.4->settings-schema.json->time_weight2->tooltip
#, fuzzy
msgid ""
"Increase or decrease this value to change the font weight (Normal = 400, "
"Bold = 700)"
msgstr "Definiu el factor d'escala de la lletra (1.2 = 120%)"

#. 5.4->settings-schema.json->time_size1->description
#. 5.4->settings-schema.json->time_size2->description
msgid "Font Size"
Expand Down
18 changes: 17 additions & 1 deletion dual-datetime@rcalixte/files/dual-datetime@rcalixte/po/da.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgstr ""
"Project-Id-Version: 1.2\n"
"Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-desklets/"
"issues\n"
"POT-Creation-Date: 2024-08-06 22:34-0400\n"
"POT-Creation-Date: 2024-09-18 21:30-0400\n"
"PO-Revision-Date: \n"
"Last-Translator: Alan Mortensen <[email protected]>\n"
"Language-Team: \n"
Expand Down Expand Up @@ -107,6 +107,22 @@ msgstr "Skrifttypefarve"
msgid "RGB or RGBA"
msgstr "RGB eller RGBA"

#. 5.4->settings-schema.json->time_weight1->description
#. 5.4->settings-schema.json->time_weight2->description
#, fuzzy
msgid "Font Weight"
msgstr "Skrifttypestørrelse"

#. 5.4->settings-schema.json->time_weight1->tooltip
#. 5.4->settings-schema.json->time_weight2->tooltip
#, fuzzy
msgid ""
"Increase or decrease this value to change the font weight (Normal = 400, "
"Bold = 700)"
msgstr ""
"Forøg eller formindsk denne værdi for at ændre skaleringen af skrifttypen "
"(1,2 = 120 %)"

#. 5.4->settings-schema.json->time_size1->description
#. 5.4->settings-schema.json->time_size2->description
msgid "Font Size"
Expand Down
16 changes: 15 additions & 1 deletion dual-datetime@rcalixte/files/dual-datetime@rcalixte/po/de.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgstr ""
"Project-Id-Version: dual-datetime@rcalixte 1.2.1\n"
"Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-desklets/"
"issues\n"
"POT-Creation-Date: 2024-08-06 22:34-0400\n"
"POT-Creation-Date: 2024-09-18 21:30-0400\n"
"PO-Revision-Date: 2024-09-17 08:55+0200\n"
"Last-Translator: acaimingus <[email protected]>\n"
"Language-Team: \n"
Expand Down Expand Up @@ -107,6 +107,20 @@ msgstr "Schriftfarbe"
msgid "RGB or RGBA"
msgstr "RGB oder RGBA"

#. 5.4->settings-schema.json->time_weight1->description
#. 5.4->settings-schema.json->time_weight2->description
msgid "Font Weight"
msgstr "Schriftbreite"

#. 5.4->settings-schema.json->time_weight1->tooltip
#. 5.4->settings-schema.json->time_weight2->tooltip
msgid ""
"Increase or decrease this value to change the font weight (Normal = 400, "
"Bold = 700)"
msgstr ""
"Erhöhe oder verkleinere diesen Wert um die Schriftbreite zu skalieren "
"(Normal = 400, Fett = 700)"

#. 5.4->settings-schema.json->time_size1->description
#. 5.4->settings-schema.json->time_size2->description
msgid "Font Size"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: dual-datetime@rcalixte 1.2.1\n"
"Project-Id-Version: dual-datetime@rcalixte 1.3.0\n"
"Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-desklets/"
"issues\n"
"POT-Creation-Date: 2024-08-06 22:34-0400\n"
"POT-Creation-Date: 2024-09-18 21:30-0400\n"
"PO-Revision-Date: \n"
"Last-Translator: \n"
"Language-Team: \n"
Expand Down Expand Up @@ -102,6 +102,18 @@ msgstr ""
msgid "RGB or RGBA"
msgstr ""

#. 5.4->settings-schema.json->time_weight1->description
#. 5.4->settings-schema.json->time_weight2->description
msgid "Font Weight"
msgstr ""

#. 5.4->settings-schema.json->time_weight1->tooltip
#. 5.4->settings-schema.json->time_weight2->tooltip
msgid ""
"Increase or decrease this value to change the font weight (Normal = 400, "
"Bold = 700)"
msgstr ""

#. 5.4->settings-schema.json->time_size1->description
#. 5.4->settings-schema.json->time_size2->description
msgid "Font Size"
Expand Down
18 changes: 17 additions & 1 deletion dual-datetime@rcalixte/files/dual-datetime@rcalixte/po/es.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgstr ""
"Project-Id-Version: 1.2\n"
"Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-desklets/"
"issues\n"
"POT-Creation-Date: 2024-08-06 22:34-0400\n"
"POT-Creation-Date: 2024-09-18 21:30-0400\n"
"PO-Revision-Date: \n"
"Last-Translator: \n"
"Language-Team: \n"
Expand Down Expand Up @@ -106,6 +106,22 @@ msgstr "Color de fuente"
msgid "RGB or RGBA"
msgstr "RGB o RGBA"

#. 5.4->settings-schema.json->time_weight1->description
#. 5.4->settings-schema.json->time_weight2->description
#, fuzzy
msgid "Font Weight"
msgstr "Tamaño de fuente"

#. 5.4->settings-schema.json->time_weight1->tooltip
#. 5.4->settings-schema.json->time_weight2->tooltip
#, fuzzy
msgid ""
"Increase or decrease this value to change the font weight (Normal = 400, "
"Bold = 700)"
msgstr ""
"Aumente o disminuya este valor para cambiar la escala del tamaño de la "
"fuente (1.2 = 120%)"

#. 5.4->settings-schema.json->time_size1->description
#. 5.4->settings-schema.json->time_size2->description
msgid "Font Size"
Expand Down
18 changes: 17 additions & 1 deletion dual-datetime@rcalixte/files/dual-datetime@rcalixte/po/fr.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgstr ""
"Project-Id-Version: 1.0\n"
"Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-desklets/"
"issues\n"
"POT-Creation-Date: 2024-08-06 22:34-0400\n"
"POT-Creation-Date: 2024-09-18 21:30-0400\n"
"PO-Revision-Date: 2023-10-21 17:11-0400\n"
"Last-Translator: Claudiux <[email protected]>\n"
"Language-Team: \n"
Expand Down Expand Up @@ -107,6 +107,22 @@ msgstr "Couleur de la police de caractères"
msgid "RGB or RGBA"
msgstr "RGB ou RGBA"

#. 5.4->settings-schema.json->time_weight1->description
#. 5.4->settings-schema.json->time_weight2->description
#, fuzzy
msgid "Font Weight"
msgstr "Taille de la police de caractères"

#. 5.4->settings-schema.json->time_weight1->tooltip
#. 5.4->settings-schema.json->time_weight2->tooltip
#, fuzzy
msgid ""
"Increase or decrease this value to change the font weight (Normal = 400, "
"Bold = 700)"
msgstr ""
"Augmentez ou diminuez cette valeur pour modifier l'échelle de la taille de "
"la police (1,2 = 120%)."

#. 5.4->settings-schema.json->time_size1->description
#. 5.4->settings-schema.json->time_size2->description
msgid "Font Size"
Expand Down
18 changes: 17 additions & 1 deletion dual-datetime@rcalixte/files/dual-datetime@rcalixte/po/hu.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgstr ""
"Project-Id-Version: 1.2\n"
"Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-desklets/"
"issues\n"
"POT-Creation-Date: 2024-08-06 22:34-0400\n"
"POT-Creation-Date: 2024-09-18 21:30-0400\n"
"PO-Revision-Date: \n"
"Last-Translator: \n"
"Language-Team: \n"
Expand Down Expand Up @@ -107,6 +107,22 @@ msgstr "Betű szín"
msgid "RGB or RGBA"
msgstr "RGB vagy RGBA"

#. 5.4->settings-schema.json->time_weight1->description
#. 5.4->settings-schema.json->time_weight2->description
#, fuzzy
msgid "Font Weight"
msgstr "Betűméret"

#. 5.4->settings-schema.json->time_weight1->tooltip
#. 5.4->settings-schema.json->time_weight2->tooltip
#, fuzzy
msgid ""
"Increase or decrease this value to change the font weight (Normal = 400, "
"Bold = 700)"
msgstr ""
"Növelje vagy csökkentse ezt az értéket a betűméret tartomány módosításához "
"(1,2 = 120%)"

#. 5.4->settings-schema.json->time_size1->description
#. 5.4->settings-schema.json->time_size2->description
msgid "Font Size"
Expand Down
18 changes: 17 additions & 1 deletion dual-datetime@rcalixte/files/dual-datetime@rcalixte/po/it.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgstr ""
"Project-Id-Version: 1.2\n"
"Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-desklets/"
"issues\n"
"POT-Creation-Date: 2024-08-06 22:34-0400\n"
"POT-Creation-Date: 2024-09-18 21:30-0400\n"
"PO-Revision-Date: \n"
"Last-Translator: Dragone2 <[email protected]>\n"
"Language-Team: \n"
Expand Down Expand Up @@ -109,6 +109,22 @@ msgstr "Colore carattere"
msgid "RGB or RGBA"
msgstr "RGB o RGBA"

#. 5.4->settings-schema.json->time_weight1->description
#. 5.4->settings-schema.json->time_weight2->description
#, fuzzy
msgid "Font Weight"
msgstr "Dimensione carattere"

#. 5.4->settings-schema.json->time_weight1->tooltip
#. 5.4->settings-schema.json->time_weight2->tooltip
#, fuzzy
msgid ""
"Increase or decrease this value to change the font weight (Normal = 400, "
"Bold = 700)"
msgstr ""
"Aumenta o diminuisci questo valore per modificare la scala delle dimensioni "
"del carattere (1.2 = 120%)"

#. 5.4->settings-schema.json->time_size1->description
#. 5.4->settings-schema.json->time_size2->description
msgid "Font Size"
Expand Down
18 changes: 17 additions & 1 deletion dual-datetime@rcalixte/files/dual-datetime@rcalixte/po/nl.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgstr ""
"Project-Id-Version: dual-datetime@rcalixte 1.1\n"
"Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-desklets/"
"issues\n"
"POT-Creation-Date: 2024-08-06 22:34-0400\n"
"POT-Creation-Date: 2024-09-18 21:30-0400\n"
"PO-Revision-Date: 2024-04-18 15:50+0200\n"
"Last-Translator: qadzek\n"
"Language-Team: \n"
Expand Down Expand Up @@ -107,6 +107,22 @@ msgstr "Letterkleur"
msgid "RGB or RGBA"
msgstr "RGB of RGBA"

#. 5.4->settings-schema.json->time_weight1->description
#. 5.4->settings-schema.json->time_weight2->description
#, fuzzy
msgid "Font Weight"
msgstr "Lettergrootte"

#. 5.4->settings-schema.json->time_weight1->tooltip
#. 5.4->settings-schema.json->time_weight2->tooltip
#, fuzzy
msgid ""
"Increase or decrease this value to change the font weight (Normal = 400, "
"Bold = 700)"
msgstr ""
"Verhoog of verlaag deze waarde om de schaal van de lettergrootte te wijzigen "
"(1.2 = 120%)"

#. 5.4->settings-schema.json->time_size1->description
#. 5.4->settings-schema.json->time_size2->description
msgid "Font Size"
Expand Down
Loading