Commit 9639e818 authored by Eisha Chen-yen-su's avatar Eisha Chen-yen-su

divider: Make the object non-selectable

See https://gitlab.gnome.org/danigm/fractal/issues/133
parent 06eb91b2
......@@ -1418,7 +1418,7 @@ impl AppOp {
}
if last == LastViewed::Inline {
let divider: gtk::Box = widgets::divider::new("New Messages");
let divider: gtk::ListBoxRow = widgets::divider::new("New Messages");
match msgpos {
MsgPos::Bottom => messages.add(&divider),
MsgPos::Top => messages.insert(&divider, 2),
......
......@@ -2,7 +2,10 @@ extern crate gtk;
use self::gtk::prelude::*;
pub fn new(text: &str) -> gtk::Box {
pub fn new(text: &str) -> gtk::ListBoxRow {
let divider_row = gtk::ListBoxRow::new();
divider_row.set_selectable(false);
let divider = gtk::Box::new(gtk::Orientation::Horizontal, 6);
if let Some(style) = divider.get_style_context() {
style.add_class("divider");
......@@ -19,6 +22,8 @@ pub fn new(text: &str) -> gtk::Box {
divider.pack_start(&label, false, false, 0);
divider.pack_start(&right_separator, true, true, 0);
divider.show_all();
divider
divider_row.add(&divider);
divider_row.show_all();
divider_row
}
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