Commit 981da601 authored by Eisha Chen-yen-su's avatar Eisha Chen-yen-su

fractal-gtk: Use a CSS class for the list divider

This removes the divider widget in the room directory and replaces
it with a border-bottom in the CSS.

See https://gitlab.gnome.org/World/fractal/issues/221
parent c85919a6
......@@ -79,6 +79,18 @@
font-size: x-small;
}
.room-directory row {
padding-top: 18px;
padding-bottom: 18px;
border-bottom: solid 1px rgba(0,0,0, 0.1);
}
.room-directoy row:last-child {
padding-top: 18px;
padding-bottom: 18px;
border-bottom: none;
}
row:not(:selected) .member-uid {
color: @insensitive_fg_color;
}
......
......@@ -104,6 +104,7 @@ impl AppOp {
let directory = self.ui.builder
.get_object::<gtk::ListBox>("directory_room_list")
.expect("Can't find directory_room_list in ui file.");
directory.get_style_context().map(|c| c.add_class("room-directory"));
for ch in directory.get_children().iter().skip(1) {
directory.remove(ch);
......
......@@ -36,7 +36,6 @@ impl<'a> RoomBox<'a> {
pub fn widget(&self) -> gtk::Box {
let room = self.room;
let list_row_box = gtk::Box::new(gtk::Orientation::Vertical, 0);
let widget_box = gtk::Box::new(gtk::Orientation::Horizontal, 0);
let mut avatar = Image::new(&self.op.backend, &room.avatar.clone().unwrap_or_default(),
......@@ -113,9 +112,7 @@ impl<'a> RoomBox<'a> {
widget_box.pack_start(&membership_grid, false, false, 18);
list_row_box.pack_start(&widget_box, true, true, 18);
list_row_box.pack_end(&gtk::Separator::new(gtk::Orientation::Horizontal), false, false, 0);
list_row_box.show_all();
list_row_box
widget_box.show_all();
widget_box
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment