Commit e30823bb authored by Adrien Plazas's avatar Adrien Plazas Committed by Guido Gunther

preferences-group: Use the h4 style class

Use the h4 style class instead of hardcoding the bold style for the
preferences group title, and implement a fallback making the font bold.

This is needed by elementary to use their own style.
parent 3270b089
Pipeline #29353 passed with stages
in 9 minutes and 27 seconds
......@@ -17,6 +17,7 @@
<gresource prefix="/sm/puri/handy/style">
<file>hdy-combo-row-list.css</file>
<file>hdy-expander-row-arrow.css</file>
<file>hdy-text.css</file>
<file>hdy-view-switcher.css</file>
<file>hdy-view-switcher-bar-box.css</file>
<file>hdy-view-switcher-button.css</file>
......
......@@ -263,6 +263,7 @@ static void
hdy_preferences_group_init (HdyPreferencesGroup *self)
{
HdyPreferencesGroupPrivate *priv = hdy_preferences_group_get_instance_private (self);
g_autoptr (GtkCssProvider) provider = gtk_css_provider_new ();
gtk_widget_init_template (GTK_WIDGET (self));
......@@ -271,6 +272,11 @@ hdy_preferences_group_init (HdyPreferencesGroup *self)
update_description_visibility (self);
update_title_visibility (self);
update_listbox_visibility (self);
gtk_css_provider_load_from_resource (provider, "/sm/puri/handy/style/hdy-text.css");
gtk_style_context_add_provider (gtk_widget_get_style_context (GTK_WIDGET (priv->title)),
GTK_STYLE_PROVIDER (provider),
GTK_STYLE_PROVIDER_PRIORITY_FALLBACK);
}
/**
......
......@@ -10,9 +10,9 @@
<property name="ellipsize">end</property>
<property name="halign">start</property>
<property name="xalign">0</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
<style>
<class name="h4"/>
</style>
</object>
</child>
<child>
......
/* Implement text styles. Add them with the fallback priority instead of
* hardcoding the style so themes can use their own style instead.
*/
.h4 {
font-weight: bold;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment