Skip to content

Commit 72bde97

Browse files
authored
Update Granite label styles (#364)
There's a couple of other places where we have deprecation warnings, but I think these need more careful consideration since they have custom rules for wrapping and ellipsizing that aren't supported by granite yet
1 parent 216c13f commit 72bde97

File tree

4 files changed

+5
-9
lines changed

4 files changed

+5
-9
lines changed

lib/SettingsSidebar.vala

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -114,12 +114,8 @@ public class Switchboard.SettingsSidebar : Gtk.Widget {
114114
}
115115
}
116116

117-
var label = new Gtk.Label (header) {
118-
halign = Gtk.Align.START,
119-
xalign = 0
120-
};
117+
var label = new Granite.HeaderLabel (header);
121118

122-
label.add_css_class (Granite.STYLE_CLASS_H4_LABEL);
123119
row.set_header (label);
124120
}
125121
});

lib/SettingsSidebarRow.vala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ private class Switchboard.SettingsSidebarRow : Gtk.ListBoxRow {
8383
xalign = 0,
8484
visible = false
8585
};
86-
status_label.add_css_class (Granite.STYLE_CLASS_SMALL_LABEL);
86+
status_label.add_css_class (Granite.CssClass.SMALL);
8787

8888
if (!page.with_avatar) {
8989
display_widget = new Gtk.Image () {

meson.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ gio_unix_dep = dependency('gio-unix-2.0')
3636
gmodule_dep = dependency('gmodule-2.0', version: '>=2.76')
3737
gtk_dep = dependency('gtk4', version: '>=3.10')
3838
gee_dep = dependency('gee-0.8')
39-
granite_dep = dependency('granite-7', version: '>=7.0.0')
39+
granite_dep = dependency('granite-7', version: '>=7.7.0')
4040
adwaita_dep = dependency('libadwaita-1', version: '>=1.4')
4141
m_dep = meson.get_compiler('c').find_library('m', required : false)
4242

src/SearchView.vala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,8 @@ public class Switchboard.SearchView : Gtk.Box {
190190
use_markup = true
191191
};
192192
description_label.set_markup (GLib.Markup.escape_text (description, -1));
193-
description_label.add_css_class (Granite.STYLE_CLASS_DIM_LABEL);
194-
description_label.add_css_class (Granite.STYLE_CLASS_SMALL_LABEL);
193+
description_label.add_css_class (Granite.CssClass.DIM);
194+
description_label.add_css_class (Granite.CssClass.SMALL);
195195

196196
var grid = new Gtk.Grid () {
197197
column_spacing = 12

0 commit comments

Comments
 (0)