Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.4.0
* libgranite-7-dev >= 7.7.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
30 changes: 8 additions & 22 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
};
grid.attach (image, 0, 0, 1, 2);
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
3 changes: 2 additions & 1 deletion src/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ shared_module(
dependency('glib-2.0', version: '>=2.34'),
dependency('gio-2.0'),
dependency('gobject-2.0'),
dependency('granite-7', version: '>=7.4.0'),
# TODO Require >= 7.8.0 when released
dependency('granite-7', version: '>=7.7.0'),
dependency('gtk4'),
dependency('libadwaita-1', version: '>=1.4'),
switchboard_dep
Expand Down
Loading