Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ShortcutsView: use Granite.HeaderLabel #147

Merged
merged 2 commits into from
Jun 5, 2024
Merged
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 src/ShortcutLabel.vala
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public class ShortcutLabel : Gtk.Box {
continue;
}
var label = new Gtk.Label (accel);
label.get_style_context ().add_class ("keycap");
label.add_css_class ("keycap");
append (label);
}
} else {
Expand Down
20 changes: 4 additions & 16 deletions src/Views/ShortcutsView.vala
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,7 @@ public class ShortcutOverlay.ShortcutsView : Gtk.Box {
row_spacing = 12
};

var windows_header = new Gtk.Label (_("Windows")) {
xalign = 0
};
windows_header.add_css_class (Granite.STYLE_CLASS_H4_LABEL);
var windows_header = new Granite.HeaderLabel (_("Windows"));

column_start.attach (windows_header, 0, 0, 2);
column_start.attach (new NameLabel (_("Close window:")), 0, 1);
Expand All @@ -51,10 +48,7 @@ public class ShortcutOverlay.ShortcutsView : Gtk.Box {
column_start.attach (new NameLabel (_("Picture in Picture Mode:")), 0, 8);
column_start.attach (new ShortcutLabel.from_gsettings (SCHEMA_GALA, "pip"), 1, 8);

var workspaces_header = new Gtk.Label (_("Workspaces")) {
xalign = 0
};
workspaces_header.add_css_class (Granite.STYLE_CLASS_H4_LABEL);
var workspaces_header = new Granite.HeaderLabel (_("Workspaces"));

column_start.attach (workspaces_header, 0, 9, 2);
column_start.attach (new NameLabel (_("Multitasking View:")), 0, 10);
Expand Down Expand Up @@ -115,10 +109,7 @@ public class ShortcutOverlay.ShortcutsView : Gtk.Box {
column_end.hexpand = true;
column_end.row_spacing = 12;

var system_header = new Gtk.Label (_("System")) {
xalign = 0
};
system_header.add_css_class (Granite.STYLE_CLASS_H4_LABEL);
var system_header = new Granite.HeaderLabel (_("System"));

column_end.attach (system_header, 0, 0, 2);
column_end.attach (new NameLabel (_("Applications Menu:")), 0, 1);
Expand All @@ -140,10 +131,7 @@ public class ShortcutOverlay.ShortcutsView : Gtk.Box {
column_end.attach (new NameLabel (_("Toggle screen reader:")), 0, 9);
column_end.attach (new ShortcutLabel.from_gsettings (SCHEMA_MEDIA, "screenreader"), 1, 9);

var screenshots_header = new Gtk.Label (_("Screenshots")) {
xalign = 0
};
screenshots_header.add_css_class (Granite.STYLE_CLASS_H4_LABEL);
var screenshots_header = new Granite.HeaderLabel (_("Screenshots"));

column_end.attach (screenshots_header, 0, 10, 2);
column_end.attach (new NameLabel (_("Grab the whole screen:")), 0, 11);
Expand Down