diff --git a/main/CMakeLists.txt b/main/CMakeLists.txt index b3ba9255..d0098719 100644 --- a/main/CMakeLists.txt +++ b/main/CMakeLists.txt @@ -49,6 +49,7 @@ set(RESOURCE_LIST icons/scalable/status/dino-status-chat.svg icons/scalable/status/dino-status-dnd.svg icons/scalable/status/dino-status-online.svg + icons/scalable/status/dino-status-offline.svg icons/scalable/status/dino-tick-symbolic.svg icons/scalable/status/dino-video-off-symbolic.svg icons/scalable/status/dino-video-symbolic.svg diff --git a/main/data/gresource.xml b/main/data/gresource.xml index 637da159..41484562 100644 --- a/main/data/gresource.xml +++ b/main/data/gresource.xml @@ -51,6 +51,7 @@ icons/scalable/status/dino-status-chat.svg icons/scalable/status/dino-status-dnd.svg icons/scalable/status/dino-status-online.svg + icons/scalable/status/dino-status-offline.svg icons/scalable/status/dino-tick-symbolic.svg icons/scalable/status/dino-video-off-symbolic.svg icons/scalable/status/dino-video-symbolic.svg diff --git a/main/data/icons/scalable/status/dino-status-offline.svg b/main/data/icons/scalable/status/dino-status-offline.svg new file mode 100644 index 00000000..544dfca0 --- /dev/null +++ b/main/data/icons/scalable/status/dino-status-offline.svg @@ -0,0 +1,11 @@ + + + + + Layer 1 + + + + + + \ No newline at end of file diff --git a/main/data/occupant_list_item.ui b/main/data/occupant_list_item.ui index 72586191..631dd574 100644 --- a/main/data/occupant_list_item.ui +++ b/main/data/occupant_list_item.ui @@ -15,7 +15,8 @@ - 1 + 20 + 40 end 1 0 @@ -26,11 +27,8 @@ - - 1 - end - 1 - 0 + + 12 2 0 diff --git a/main/src/ui/occupant_menu/list_row.vala b/main/src/ui/occupant_menu/list_row.vala index bd6519ec..8e437c23 100644 --- a/main/src/ui/occupant_menu/list_row.vala +++ b/main/src/ui/occupant_menu/list_row.vala @@ -10,10 +10,7 @@ public class ListRow : Object { private Grid main_grid; private AvatarPicture picture; public Label name_label; - - // TODO: use something more visual for status - public Label status; - + public Image status_image; public Conversation? conversation; public Jid? jid; @@ -22,8 +19,10 @@ public class ListRow : Object { main_grid = (Grid) builder.get_object("main_grid"); picture = (AvatarPicture) builder.get_object("picture"); name_label = (Label) builder.get_object("name_label"); - status = (Label) builder.get_object("status_label"); - status.label = "(unknown)"; + status_image = (Image) builder.get_object("status_image"); + main_grid.set_column_spacing(10); + main_grid.set_column_homogeneous(false); + main_grid.set_baseline_row(1); } public ListRow(StreamInteractor stream_interactor, Conversation conversation, Jid jid) { @@ -44,11 +43,11 @@ public class ListRow : Object { } public void set_online() { - status.label = (""); + status_image.icon_name = "dino-status-online"; } public void set_offline() { - status.label = ("(offline)"); + status_image.icon_name = "dino-status-offline"; } }