control icon pos in css

This commit is contained in:
ouwou 2022-08-10 00:03:04 -04:00
parent 02741f2c1b
commit f60cea2216
2 changed files with 5 additions and 4 deletions

View File

@ -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 */

View File

@ -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;