mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-06 16:50:11 +00:00
GtkStyleProperties: Merge font descriptions on merge()
This is necessary so incomplete font descriptions are ensured to have family and size.
This commit is contained in:
parent
af20ba6103
commit
fb8de847df
@ -1059,7 +1059,19 @@ gtk_style_properties_merge (GtkStyleProperties *props,
|
||||
data = &g_array_index (prop_to_merge->values, ValueData, i);
|
||||
value = property_data_get_value (prop, data->state);
|
||||
|
||||
if (replace || !G_IS_VALUE (value))
|
||||
if (G_VALUE_TYPE (&data->value) == PANGO_TYPE_FONT_DESCRIPTION &&
|
||||
G_IS_VALUE (value))
|
||||
{
|
||||
PangoFontDescription *font_desc;
|
||||
PangoFontDescription *font_desc_to_merge;
|
||||
|
||||
/* Handle merging of font descriptions */
|
||||
font_desc = g_value_get_boxed (value);
|
||||
font_desc_to_merge = g_value_get_boxed (&data->value);
|
||||
|
||||
pango_font_description_merge (font_desc, font_desc_to_merge, replace);
|
||||
}
|
||||
else if (replace || !G_IS_VALUE (value))
|
||||
{
|
||||
if (!G_IS_VALUE (value))
|
||||
g_value_init (value, G_VALUE_TYPE (&data->value));
|
||||
|
Loading…
Reference in New Issue
Block a user