mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-27 22:20:24 +00:00
settings: Never override some font properties
According to the CSS specification, everything but font-size and font-family are defined by CSS. So we don't override them anymore.
This commit is contained in:
parent
be53513954
commit
fe61e6b3fe
@ -1428,23 +1428,12 @@ settings_ensure_style (GtkSettings *settings)
|
||||
|
||||
font_desc = pango_font_description_from_string (font_name);
|
||||
|
||||
/* Unset normal attributes from this description,
|
||||
/* Unset attributes from this description,
|
||||
* so they do not override theme values */
|
||||
if (pango_font_description_get_weight (font_desc) == PANGO_WEIGHT_NORMAL)
|
||||
pango_font_description_unset_fields (font_desc,
|
||||
PANGO_FONT_MASK_WEIGHT);
|
||||
|
||||
if (pango_font_description_get_stretch (font_desc) == PANGO_STRETCH_NORMAL)
|
||||
pango_font_description_unset_fields (font_desc,
|
||||
PANGO_FONT_MASK_STRETCH);
|
||||
|
||||
if (pango_font_description_get_variant (font_desc) == PANGO_VARIANT_NORMAL)
|
||||
pango_font_description_unset_fields (font_desc,
|
||||
PANGO_FONT_MASK_VARIANT);
|
||||
|
||||
if (pango_font_description_get_style (font_desc) == PANGO_STYLE_NORMAL)
|
||||
pango_font_description_unset_fields (font_desc,
|
||||
PANGO_FONT_MASK_STYLE);
|
||||
pango_font_description_unset_fields (font_desc, PANGO_FONT_MASK_WEIGHT);
|
||||
pango_font_description_unset_fields (font_desc, PANGO_FONT_MASK_STRETCH);
|
||||
pango_font_description_unset_fields (font_desc, PANGO_FONT_MASK_VARIANT);
|
||||
pango_font_description_unset_fields (font_desc, PANGO_FONT_MASK_STYLE);
|
||||
|
||||
gtk_style_properties_set (priv->style, 0,
|
||||
"font", font_desc,
|
||||
|
Loading…
Reference in New Issue
Block a user