From f60cea2216dd9677cb9105364cdaa778a0c187db Mon Sep 17 00:00:00 2001 From: ouwou <26526779+ouwou@users.noreply.github.com> Date: Wed, 10 Aug 2022 00:03:04 -0400 Subject: [PATCH] control icon pos in css --- res/css/main.css | 2 ++ src/components/chatinput.cpp | 7 +++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/res/css/main.css b/res/css/main.css index 9398d48..ace3b0b 100644 --- a/res/css/main.css +++ b/res/css/main.css @@ -120,6 +120,8 @@ .message-input-browse-icon { color: #b9bbbe; + margin-left: 5px; + margin-top: 11px; } /* i dont think theres a way to circumvent having to do this to adjust around the browse icon */ diff --git a/src/components/chatinput.cpp b/src/components/chatinput.cpp index 87892e0..2466965 100644 --- a/src/components/chatinput.cpp +++ b/src/components/chatinput.cpp @@ -176,11 +176,10 @@ bool ChatInputTextContainer::GetChildPosition(Gtk::Widget *child, Gdk::Rectangle Gtk::Requisition min, req; child->get_preferred_size(min, req); - // yummy hardcoded values - pos.set_x(5); + // let css move it around + pos.set_x(0); + pos.set_y(0); pos.set_width(std::max(min.width, std::min(main_alloc.get_width(), req.width))); - - pos.set_y(12); pos.set_height(std::max(min.height, std::min(main_alloc.get_height(), req.height))); return true;