From 4faee9f08dca187b04a6f5719fe766a3b4375460 Mon Sep 17 00:00:00 2001 From: fiaxh Date: Wed, 15 Mar 2017 00:36:56 +0100 Subject: Set dino-specific icons as part of icon theme --- main/CMakeLists.txt | 12 +- main/data/icons/dino-double-tick-symbolic.svg | 7 + main/data/icons/dino-status-away.svg | 7 + main/data/icons/dino-status-chat.svg | 9 + main/data/icons/dino-status-dnd.svg | 7 + main/data/icons/dino-status-online.svg | 6 + main/data/icons/dino-tick-symbolic.svg | 6 + main/data/img/double_tick.svg | 190 --------------------- main/data/img/send.svg | 1 - main/data/img/status_away.svg | 73 -------- main/data/img/status_chat.svg | 85 --------- main/data/img/status_dnd.svg | 73 -------- main/data/img/status_online.svg | 67 -------- main/data/img/tick.svg | 184 -------------------- main/src/ui/application.vala | 1 + main/src/ui/conversation_selector/chat_row.vala | 11 +- .../conversation_summary/merged_message_item.vala | 4 +- main/src/ui/util.vala | 1 + 18 files changed, 56 insertions(+), 688 deletions(-) create mode 100644 main/data/icons/dino-double-tick-symbolic.svg create mode 100644 main/data/icons/dino-status-away.svg create mode 100644 main/data/icons/dino-status-chat.svg create mode 100644 main/data/icons/dino-status-dnd.svg create mode 100644 main/data/icons/dino-status-online.svg create mode 100644 main/data/icons/dino-tick-symbolic.svg delete mode 100644 main/data/img/double_tick.svg delete mode 100644 main/data/img/send.svg delete mode 100644 main/data/img/status_away.svg delete mode 100644 main/data/img/status_chat.svg delete mode 100644 main/data/img/status_dnd.svg delete mode 100644 main/data/img/status_online.svg delete mode 100644 main/data/img/tick.svg diff --git a/main/CMakeLists.txt b/main/CMakeLists.txt index ef78f446..619f23c9 100644 --- a/main/CMakeLists.txt +++ b/main/CMakeLists.txt @@ -15,12 +15,12 @@ set(MAIN_PACKAGES pkg_check_modules(MAIN REQUIRED ${MAIN_PACKAGES}) set(RESOURCE_LIST - img/double_tick.svg - img/status_away.svg - img/status_chat.svg - img/status_dnd.svg - img/status_online.svg - img/tick.svg + icons/dino-double-tick-symbolic.svg + icons/dino-status-away.svg + icons/dino-status-chat.svg + icons/dino-status-dnd.svg + icons/dino-status-online.svg + icons/dino-tick-symbolic.svg add_conversation/add_contact_dialog.ui add_conversation/add_groupchat_dialog.ui diff --git a/main/data/icons/dino-double-tick-symbolic.svg b/main/data/icons/dino-double-tick-symbolic.svg new file mode 100644 index 00000000..abbf5142 --- /dev/null +++ b/main/data/icons/dino-double-tick-symbolic.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/main/data/icons/dino-status-away.svg b/main/data/icons/dino-status-away.svg new file mode 100644 index 00000000..1bfc2351 --- /dev/null +++ b/main/data/icons/dino-status-away.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/main/data/icons/dino-status-chat.svg b/main/data/icons/dino-status-chat.svg new file mode 100644 index 00000000..ac766a8a --- /dev/null +++ b/main/data/icons/dino-status-chat.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/main/data/icons/dino-status-dnd.svg b/main/data/icons/dino-status-dnd.svg new file mode 100644 index 00000000..a81c6c3b --- /dev/null +++ b/main/data/icons/dino-status-dnd.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/main/data/icons/dino-status-online.svg b/main/data/icons/dino-status-online.svg new file mode 100644 index 00000000..f5f828c7 --- /dev/null +++ b/main/data/icons/dino-status-online.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/main/data/icons/dino-tick-symbolic.svg b/main/data/icons/dino-tick-symbolic.svg new file mode 100644 index 00000000..bc067e02 --- /dev/null +++ b/main/data/icons/dino-tick-symbolic.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/main/data/img/double_tick.svg b/main/data/img/double_tick.svg deleted file mode 100644 index d65840f6..00000000 --- a/main/data/img/double_tick.svg +++ /dev/null @@ -1,190 +0,0 @@ - - - - - - - - - - - image/svg+xml - - Paper Symbolic Icon Theme - - - - Paper Symbolic Icon Theme - - - - - - - - - - - - - - - - - - - - - - - diff --git a/main/data/img/send.svg b/main/data/img/send.svg deleted file mode 100644 index 8627d4a7..00000000 --- a/main/data/img/send.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/main/data/img/status_away.svg b/main/data/img/status_away.svg deleted file mode 100644 index d976d095..00000000 --- a/main/data/img/status_away.svg +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - - - diff --git a/main/data/img/status_chat.svg b/main/data/img/status_chat.svg deleted file mode 100644 index 5b427cb6..00000000 --- a/main/data/img/status_chat.svg +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - - - - - diff --git a/main/data/img/status_dnd.svg b/main/data/img/status_dnd.svg deleted file mode 100644 index e7e17e78..00000000 --- a/main/data/img/status_dnd.svg +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - - - diff --git a/main/data/img/status_online.svg b/main/data/img/status_online.svg deleted file mode 100644 index 13cc6592..00000000 --- a/main/data/img/status_online.svg +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - - diff --git a/main/data/img/tick.svg b/main/data/img/tick.svg deleted file mode 100644 index 4a08848c..00000000 --- a/main/data/img/tick.svg +++ /dev/null @@ -1,184 +0,0 @@ - - - - - - - - - - - image/svg+xml - - Paper Symbolic Icon Theme - - - - Paper Symbolic Icon Theme - - - - - - - - - - - - - - - - - - - - - - diff --git a/main/src/ui/application.vala b/main/src/ui/application.vala index 8dbe176b..66fc0fd0 100644 --- a/main/src/ui/application.vala +++ b/main/src/ui/application.vala @@ -16,6 +16,7 @@ public class Dino.Ui.Application : Dino.Application { notifications = new Notifications(stream_interaction); notifications.start(); Environment.set_application_name("Dino"); + IconTheme.get_default().add_resource_path("/org/dino-im/icons"); } public override void activate() { diff --git a/main/src/ui/conversation_selector/chat_row.vala b/main/src/ui/conversation_selector/chat_row.vala index 8b36b333..96f6921d 100644 --- a/main/src/ui/conversation_selector/chat_row.vala +++ b/main/src/ui/conversation_selector/chat_row.vala @@ -61,18 +61,15 @@ public class ChatRow : ConversationRow { Show show = PresenceManager.get_instance(stream_interactor).get_last_show(full_jids[i], conversation.account); Image image = new Image(); - Pixbuf pixbuf; - int icon_size = 13 * image.scale_factor; if (show.as == Show.AWAY) { - pixbuf = new Pixbuf.from_resource_at_scale("/org/dino-im/img/status_away.svg", icon_size, icon_size, true); + image.set_from_icon_name("dino-status-away", IconSize.SMALL_TOOLBAR); } else if (show.as == Show.XA || show.as == Show.DND) { - pixbuf = new Pixbuf.from_resource_at_scale("/org/dino-im/img/status_dnd.svg", icon_size, icon_size, true); + image.set_from_icon_name("dino-status-dnd", IconSize.SMALL_TOOLBAR); } else if (show.as == Show.CHAT) { - pixbuf = new Pixbuf.from_resource_at_scale("/org/dino-im/img/status_chat.svg", icon_size, icon_size, true); + image.set_from_icon_name("dino-status-chat", IconSize.SMALL_TOOLBAR); } else { - pixbuf = new Pixbuf.from_resource_at_scale("/org/dino-im/img/status_online.svg", icon_size, icon_size, true); + image.set_from_icon_name("dino-status-online", IconSize.SMALL_TOOLBAR); } - Util.image_set_from_scaled_pixbuf(image, pixbuf); box.add(image); Label resource = new Label(full_jids[i].resourcepart); diff --git a/main/src/ui/conversation_summary/merged_message_item.vala b/main/src/ui/conversation_summary/merged_message_item.vala index 695bf589..190be50a 100644 --- a/main/src/ui/conversation_summary/merged_message_item.vala +++ b/main/src/ui/conversation_summary/merged_message_item.vala @@ -94,10 +94,10 @@ public class MergedMessageItem : Grid { } if (all_read) { received_image.visible = true; - received_image.set_from_resource("/org/dino-im/img/double_tick.svg"); + received_image.set_from_icon_name("dino-double-tick-symbolic", IconSize.SMALL_TOOLBAR); } else if (all_received) { received_image.visible = true; - received_image.set_from_resource("/org/dino-im/img/tick.svg"); + received_image.set_from_icon_name("dino-tick-symbolic", IconSize.SMALL_TOOLBAR); } else if (received_image.visible) { received_image.set_from_icon_name("image-loading-symbolic", IconSize.SMALL_TOOLBAR); } diff --git a/main/src/ui/util.vala b/main/src/ui/util.vala index ec09609a..34df82d8 100644 --- a/main/src/ui/util.vala +++ b/main/src/ui/util.vala @@ -9,6 +9,7 @@ public class Util : Object { private const string[] tango_colors_light = {"FCE94F", "FCAF3E", "E9B96E", "8AE234", "729FCF", "AD7FA8", "EF2929"}; private const string[] tango_colors_medium = {"EDD400", "F57900", "C17D11", "73D216", "3465A4", "75507B", "CC0000"}; + private const string[] material_colors_800 = {"D32F2F", "C2185B", "7B1FA2", "512DA8", "303F9F", "1976D2", "0288D1", "0097A7", "00796B", "388E3C", "689F38", "AFB42B", "FFA000", "F57C00", "E64A19", "5D4037"}; private const string[] material_colors_500 = {"F44336", "E91E63", "9C27B0", "673AB7", "3f51B5", "2196F3", "03A9f4", "00BCD4", "009688", "4CAF50", "8BC34a", "CDDC39", "FFC107", "FF9800", "FF5722", "795548"}; private const string[] material_colors_300 = {"E57373", "F06292", "BA68C8", "9575CD", "7986CB", "64B5F6", "4FC3F7", "4DD0E1", "4DB6AC", "81C784", "AED581", "DCE775", "FFD54F", "FFB74D", "FF8A65", "A1887F"}; private const string[] material_colors_200 = {"EF9A9A", "F48FB1", "CE93D8", "B39DDB", "9FA8DA", "90CAF9", "81D4FA", "80DEEA", "80CBC4", "A5D6A7", "C5E1A5", "E6EE9C", "FFE082", "FFCC80", "FFAB91", "BCAAA4"}; -- cgit v1.2.3-70-g09d2