Fix Jauge name centering and add name appearance controls
Center the name+bar block vertically within the Jauge's own box (justify-content:center) so it no longer looks pinned to the top once a name label adds extra content height. Add appearance settings for the name: position (above the bar, or beside it on the left), alignment when above (centered or left-aligned), font family, font size, bold, and italic. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
7e4df3fa3a
commit
3039489e39
@@ -8,6 +8,7 @@ from .controls.c_toggle_token import c_toggle_token
|
||||
from .controls.c_align import c_align
|
||||
from .controls.c_select import c_select
|
||||
from .control_groups.text_style_controls_extra import TEXT_STYLE_CONTROLS_EXTRA
|
||||
from .font_options import FONT_OPTIONS
|
||||
from ..flow.constants import CONDITION_OPERATORS
|
||||
|
||||
WIDGETS = {
|
||||
@@ -247,6 +248,16 @@ WIDGETS = {
|
||||
c_color("couleur_basse", "Couleur côté mini", "attr:_couleur_basse", "#e05252", group="Apparence"),
|
||||
c_color("couleur_haute", "Couleur côté maxi", "attr:_couleur_haute", "#4caf50", group="Apparence"),
|
||||
c_checkbox("afficher_valeur", "Afficher la valeur en chiffres sur la jauge", "attr:_afficher_valeur", "1", "", default=False, group="Apparence"),
|
||||
c_select("nom_position", "Position du nom", "attr:_nom_position",
|
||||
[("dessus", "Au-dessus de la jauge"), ("cote", "À côté (à gauche) de la jauge")],
|
||||
default="dessus", group="Apparence"),
|
||||
c_select("nom_alignement", "Alignement du nom (si au-dessus)", "attr:_nom_alignement",
|
||||
[("centre", "Centré"), ("gauche", "Aligné à gauche")],
|
||||
default="centre", group="Apparence"),
|
||||
c_select("nom_police", "Police du nom", "attr:_nom_police", FONT_OPTIONS, default="inherit", group="Apparence"),
|
||||
c_slider("nom_taille", "Taille du texte du nom", "attr:_nom_taille", unit="", min=8, max=32, default=12, group="Apparence"),
|
||||
c_checkbox("nom_gras", "Nom en gras", "attr:_nom_gras", "1", "", default=False, group="Apparence"),
|
||||
c_checkbox("nom_italique", "Nom en italique", "attr:_nom_italique", "1", "", default=False, group="Apparence"),
|
||||
],
|
||||
},
|
||||
"superposition": {
|
||||
|
||||
Reference in New Issue
Block a user