Skip to content

Commit

Permalink
use RICH LIST
Browse files Browse the repository at this point in the history
  • Loading branch information
danirabbit committed Jan 16, 2024
1 parent b15c887 commit 41914e5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
1 change: 1 addition & 0 deletions src/Views/VPNPage.vala
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ public class Network.VPNPage : Network.Widgets.Page {
};
vpn_list.set_placeholder (placeholder);
vpn_list.set_sort_func ((Gtk.ListBoxSortFunc) compare_rows);
vpn_list.add_css_class (Granite.STYLE_CLASS_RICH_LIST);

var add_button_label = new Gtk.Label (_("Add Connection…"));

Expand Down
10 changes: 3 additions & 7 deletions src/Widgets/VPN/VPNMenuItem.vala
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public class Network.VPNMenuItem : Gtk.ListBoxRow {

construct {
var image = new Gtk.Image.from_icon_name ("network-vpn") {
pixel_size = 32
icon_size = LARGE
};

vpn_state = new Gtk.Image.from_icon_name ("user-offline") {
Expand Down Expand Up @@ -69,11 +69,11 @@ public class Network.VPNMenuItem : Gtk.ListBoxRow {
};

var vpn_info_button = new Gtk.Button () {
child = new Gtk.Image.from_icon_name ("view-more-horizontal-symbolic"),
has_frame = false,
icon_name = "view-more-horizontal-symbolic",
margin_end = 3,
valign = Gtk.Align.CENTER
};
vpn_info_button.add_css_class (Granite.STYLE_CLASS_FLAT);

connect_button = new Gtk.Button () {
valign = Gtk.Align.CENTER,
Expand All @@ -83,10 +83,6 @@ public class Network.VPNMenuItem : Gtk.ListBoxRow {
size_group.add_widget (connect_button);

var grid = new Gtk.Grid () {
margin_start = 6,
margin_end = 6,
margin_top = 6,
margin_bottom = 6,
column_spacing = 6
};
grid.attach (overlay, 0, 0, 1, 2);
Expand Down

0 comments on commit 41914e5

Please sign in to comment.