Make Conteneur a native Bulma box by default instead of an opt-in style picker
Dropped the "Style Bulma" select that required manually choosing "Carte" to get Bulma's box class — the widget now always carries class="box", same unconditional pattern as Bouton (button) and Titre (title). A custom background color still overrides it the moment it's set, same as before.
This commit is contained in:
@@ -205,17 +205,16 @@ WIDGETS = {
|
|||||||
"conteneur": {
|
"conteneur": {
|
||||||
"label": "Conteneur / décor", "icon": "⬛", "tag": "div", "has_content": True,
|
"label": "Conteneur / décor", "icon": "⬛", "tag": "div", "has_content": True,
|
||||||
"w": 50, "h": 30, "default_content": "",
|
"w": 50, "h": 30, "default_content": "",
|
||||||
|
# class:"box" — ce widget EST une carte Bulma nativement (fond clair,
|
||||||
|
# ombre, coins arrondis), pas un habillage qu'on choisit dans un
|
||||||
|
# menu : voir bouton/titre ci-dessus, même logique. Une couleur de
|
||||||
|
# fond personnalisée (réglage ci-dessous) reste prioritaire dès
|
||||||
|
# qu'elle est choisie, exactement comme avant.
|
||||||
|
"fixed_attrs": {"class": "box"},
|
||||||
"controls": [
|
"controls": [
|
||||||
c_text("content", "Texte", "content", group="Contenu"),
|
c_text("content", "Texte", "content", group="Contenu"),
|
||||||
# "Carte (Bulma)" reste optionnel (pas une classe posée par
|
|
||||||
# défaut) : ce widget sert aussi bien de simple habillage
|
|
||||||
# invisible (empilement, fond de décor plein écran...) que de
|
|
||||||
# vraie carte — lui imposer le fond blanc/l'ombre de Bulma par
|
|
||||||
# défaut casserait ces usages existants. Voir _visible_attrs.py.
|
|
||||||
c_select("bulma_carte", "Style Bulma", "class:carte",
|
|
||||||
[("", "Aucun"), ("box", "Carte (fond clair, ombre, coins arrondis)")], default="", group="Style Bulma"),
|
|
||||||
c_color("background", "Couleur de fond", "style:background-color", "#1f2430", group="Texte"),
|
c_color("background", "Couleur de fond", "style:background-color", "#1f2430", group="Texte"),
|
||||||
c_slider("border-radius", "Arrondi des coins", "style:border-radius", min=0, max=60, default=10, group="Texte"),
|
c_slider("border-radius", "Arrondi des coins", "style:border-radius", min=0, max=60, default=10, group="Texte", no_freeze=True),
|
||||||
c_slider("opacity", "Opacité", "style:opacity", unit="", min=0, max=1, step=0.05, default=1, group="Texte"),
|
c_slider("opacity", "Opacité", "style:opacity", unit="", min=0, max=1, step=0.05, default=1, group="Texte"),
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user