From ad655dbae30fe7ca7ea2e27d4b9284aee30c6163 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Thu, 22 Nov 2018 22:10:49 +0100 Subject: Room image --- css/style.css | 11 +++++------ src/Topbar.cpp | 11 ++++++++++- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/css/style.css b/css/style.css index ee7a52f..276315e 100644 --- a/css/style.css +++ b/css/style.css @@ -18,21 +18,20 @@ dialog { entry { caret-color: #f7f7f7; - /* background-color: #444444; border-color: #444444; border-radius: 4px; - */ - background-color: transparent; border: none; - border-bottom: 2px solid #616161; - border-radius: 0px; - padding: 0px; + padding: 0px 10px; margin: 0px; color: #f7f7f7; box-shadow: none; } +entry:disabled { + color: #b8b8b8; +} + label { color: #f7f7f7; } diff --git a/src/Topbar.cpp b/src/Topbar.cpp index 6339761..e4d5fd4 100644 --- a/src/Topbar.cpp +++ b/src/Topbar.cpp @@ -1,4 +1,5 @@ #include "../include/Topbar.hpp" +#include "../include/DynamicImage.hpp" namespace dchat { @@ -22,16 +23,24 @@ namespace dchat topbarLeft->attach(topbarSearchBar, 0, 0, 1, 1); Gtk::Grid *topbarRight = Gtk::manage(new Gtk::Grid()); + topbarRight->set_column_spacing(10); topbarRight->set_name("top-bar-right"); topbarRight->set_hexpand(true); topbarRight->set_valign(Gtk::ALIGN_CENTER); attach_next_to(*topbarRight, *topbarLeft, Gtk::POS_RIGHT, 1, 1); + DynamicImage *roomIcon = Gtk::manage(new DynamicImage()); + roomIcon->set_halign(Gtk::ALIGN_START); + roomIcon->set_valign(Gtk::ALIGN_CENTER); + roomIcon->set_size_request(30, 30); + roomIcon->url = "https://discordemoji.com/assets/emoji/PeepoHide.png"; + topbarRight->attach(*roomIcon, 0, 0, 1, 1); + currentRoomTitle.set_name("current-room-title"); currentRoomTitle.set_selectable(true); currentRoomTitle.set_hexpand(true); currentRoomTitle.set_alignment(Gtk::ALIGN_START, Gtk::ALIGN_CENTER); - topbarRight->attach(currentRoomTitle, 0, 0, 1, 1); + topbarRight->attach_next_to(currentRoomTitle, *roomIcon, Gtk::POS_RIGHT, 1, 1); topbarRight->attach_next_to(roomSettingsButton, currentRoomTitle, Gtk::POS_RIGHT, 1, 1); topbarRight->attach_next_to(roomNotificationsButton, roomSettingsButton, Gtk::POS_RIGHT, 1, 1); -- cgit v1.2.3