Skip to content
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ You'll need the following dependencies:
* libadwaita-1-dev
* libswitchboard-3-dev
* libflatpak-dev
* libgranite-7-dev >= 7.6.0
* libgranite-7-dev >= 7.8.0
* libgtk-4-dev
* meson >= 0.58.0
* valac
Expand Down
4 changes: 2 additions & 2 deletions src/Permissions/Widgets/PermissionSettingsWidget.vala
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ public class Permissions.Widgets.PermissionSettingsWidget : Gtk.ListBoxRow {
wrap = true,
xalign = 0
};
description_label.add_css_class (Granite.STYLE_CLASS_DIM_LABEL);
description_label.add_css_class (Granite.STYLE_CLASS_SMALL_LABEL);
description_label.add_css_class (Granite.CssClass.DIM);
description_label.add_css_class (Granite.CssClass.SMALL);

var allow_switch = new Gtk.Switch () {
focusable = false,
Expand Down
32 changes: 9 additions & 23 deletions src/Permissions/Widgets/SidebarRow.vala
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@

public class Permissions.SidebarRow : Gtk.ListBoxRow {
public Permissions.Backend.App app { get; construct; }
private Gtk.Label description_label;
private Gtk.Revealer description_revealer;
private Granite.HeaderLabel title_label;

public SidebarRow (Permissions.Backend.App app) {
Object (app: app);
Expand All @@ -33,30 +32,17 @@ public class Permissions.SidebarRow : Gtk.ListBoxRow {
pixel_size = 32
};

var title_label = new Gtk.Label (app.name) {
ellipsize = Pango.EllipsizeMode.END,
valign = Gtk.Align.END,
xalign = 0
};
title_label.add_css_class (Granite.STYLE_CLASS_H3_LABEL);

description_label = new Gtk.Label ("") {
ellipsize = Pango.EllipsizeMode.END,
valign = Gtk.Align.START,
xalign = 0
};
description_label.add_css_class (Granite.STYLE_CLASS_SMALL_LABEL);

description_revealer = new Gtk.Revealer () {
child = description_label
title_label = new Granite.HeaderLabel (app.name) {
size = H3,
valign = START,
ellipsize = END
};

var grid = new Gtk.Grid () {
column_spacing = 6
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to also adjust this and there's significant changes to padding here:

BEFORE

Screenshot from 2025-12-18 14 46 27

AFTER

Screenshot from 2025-12-18 14 46 05

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess the cause of the unwanted margins are due to Granite.HeaderLabel itself, not the grid here, so maybe we need to fix this in Granite?

スクリーンショット 2025-12-19 21 10 47

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

};
grid.attach (image, 0, 0, 1, 2);
grid.attach (image, 0, 0);
grid.attach (title_label, 1, 0);
grid.attach (description_revealer, 1, 1);

accessible_role = TAB;
child = grid;
Expand All @@ -82,14 +68,14 @@ public class Permissions.SidebarRow : Gtk.ListBoxRow {
if (current_permissions.length > 0) {
/// Translators: This is a delimiter that separates types of permissions in the sidebar description
var description = string.joinv (_(", "), current_permissions.data);
description_label.label = description;
description_revealer.reveal_child = true;
title_label.secondary_text = description;
tooltip_text = description;

update_property (Gtk.AccessibleProperty.DESCRIPTION, description, -1);
} else {
description_revealer.reveal_child = false;
title_label.secondary_text = "";
tooltip_text = null;

update_property (Gtk.AccessibleProperty.DESCRIPTION, null, -1);
}
}
Expand Down
6 changes: 2 additions & 4 deletions src/Sidebar.vala
Original file line number Diff line number Diff line change
Expand Up @@ -174,11 +174,9 @@ public class Applications.Sidebar : Gtk.Box {
icon_size = LARGE
};

var title_label = new Gtk.Label (label) {
ellipsize = END,
xalign = 0
var title_label = new Granite.HeaderLabel (label) {
size = H3
};
title_label.add_css_class (Granite.STYLE_CLASS_H3_LABEL);

var box = new Gtk.Box (HORIZONTAL, 6);
box.append (image);
Expand Down
2 changes: 1 addition & 1 deletion src/Startup/Widgets/AppChooserRow.vala
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public class Startup.Widgets.AppChooserRow : Gtk.Grid {
xalign = 0,
ellipsize = Pango.EllipsizeMode.END
};
app_comment.add_css_class (Granite.STYLE_CLASS_SMALL_LABEL);
app_comment.add_css_class (Granite.CssClass.SMALL);

column_spacing = 6;
attach (image, 0, 0, 1, 2);
Expand Down
2 changes: 1 addition & 1 deletion src/Startup/Widgets/AppRow.vala
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public class Startup.Widgets.AppRow : Gtk.ListBoxRow {
hexpand = true,
xalign = 0
};
app_comment.add_css_class (Granite.STYLE_CLASS_SMALL_LABEL);
app_comment.add_css_class (Granite.CssClass.SMALL);

var remove_button = new Gtk.Button.from_icon_name ("edit-delete-symbolic") {
tooltip_text = _("Remove this app from startup")
Expand Down
2 changes: 1 addition & 1 deletion src/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ shared_module(
dependency('glib-2.0', version: '>=2.34'),
dependency('gio-2.0'),
dependency('gobject-2.0'),
dependency('granite-7', version: '>=7.6.0'),
dependency('granite-7', version: '>=7.8.0'),
dependency('gtk4'),
dependency('libadwaita-1', version: '>=1.4'),
switchboard_dep
Expand Down