Commit 078388ad authored by Daniel García Moreno's avatar Daniel García Moreno

Direct rooms with border

I've added a blue border to each direct room to differentiate from
normal rooms.
parent 49c51bcd
......@@ -68,3 +68,12 @@
color: @insensitive_fg_color;
font-size: x-small;
}
.direct {
border: 3px solid alpha(@theme_selected_bg_color, 0.70);
border-radius: 20px;
}
.room-list list row:selected .direct {
border: 3px solid @theme_selected_fg_color;
}
extern crate gtk;
extern crate gdk;
extern crate gdk_pixbuf;
extern crate cairo;
use self::gtk::prelude::*;
pub use self::gtk::DrawingArea;
......@@ -113,6 +114,7 @@ impl AvatarExt for gtk::Box {
da.connect_draw(move |da, g| {
use std::f64::consts::PI;
g.set_antialias(cairo::Antialias::Best);
let width = s as f64;
let height = s as f64;
......
......@@ -42,6 +42,13 @@ impl RoomRow {
let name = room.name.clone().unwrap_or_default();
let avatar = room.avatar.clone().unwrap_or_default();
let icon = widgets::Avatar::avatar_new(Some(ICON_SIZE));
if room.direct {
if let Some(style) = icon.get_style_context() {
style.add_class("direct");
}
}
let text = gtk::Label::new(name.clone().as_str());
let baseu = url.clone();
text.set_alignment(0.0, 0.0);
......
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