diff --git a/src/chat_gui/contact_list.cpp b/src/chat_gui/contact_list.cpp index 33676b4..4117c21 100644 --- a/src/chat_gui/contact_list.cpp +++ b/src/chat_gui/contact_list.cpp @@ -203,7 +203,8 @@ bool renderContactBig( renderAvatar(th, contact_tc, c, {img_y, img_y}); - ImGui::SameLine(); + const float same_line_spacing = ImGui::GetStyle().ItemSpacing.x*0.5f; + ImGui::SameLine(0.f, same_line_spacing); ImGui::BeginGroup(); { { // line 1 @@ -230,7 +231,7 @@ bool renderContactBig( ); } ImGui::Dummy(p1_o); - ImGui::SameLine(0.f, ImGui::GetStyle().ItemSpacing.x*0.5f); + ImGui::SameLine(0.f, same_line_spacing); } ImGui::Text("%s%s", unread?"* ":"", (c.all_of() ? c.get().name.c_str() : "")); @@ -267,7 +268,7 @@ bool renderContactBig( ); } ImGui::Dummy(p1_o); - ImGui::SameLine(0.f, ImGui::GetStyle().ItemSpacing.x*0.5f); + ImGui::SameLine(0.f, same_line_spacing); } if ( diff --git a/src/chat_gui4.cpp b/src/chat_gui4.cpp index 86a1758..cdb258f 100644 --- a/src/chat_gui4.cpp +++ b/src/chat_gui4.cpp @@ -227,7 +227,7 @@ float ChatGui4::render(float time_delta) { if (sub_contacts != nullptr && !_cr.all_of(*_selected_contact) && _cr.all_of(*_selected_contact)) { if (!sub_contacts->empty()) { - if (ImGui::BeginChild("subcontacts", {175, -100}, true)) { + if (ImGui::BeginChild("subcontacts", {TEXT_BASE_WIDTH * 18.f, -100.f}, true)) { ImGui::Text("subs: %zu", sub_contacts->size()); ImGui::Separator(); for (const auto& c : *sub_contacts) { @@ -298,7 +298,7 @@ float ChatGui4::render(float time_delta) { ImGuiTableFlags_SizingFixedFit ; if (msg_reg_ptr != nullptr && ImGui::BeginTable("chat_table", 5, table_flags)) { - ImGui::TableSetupColumn("name", 0, TEXT_BASE_WIDTH * 15.f); + ImGui::TableSetupColumn("name", 0, TEXT_BASE_WIDTH * 16.f); ImGui::TableSetupColumn("message", ImGuiTableColumnFlags_WidthStretch); ImGui::TableSetupColumn("delivered/read"); ImGui::TableSetupColumn("timestamp"); @@ -388,7 +388,7 @@ float ChatGui4::render(float time_delta) { if (ImGui::TableNextColumn()) { const float img_y {TEXT_BASE_HEIGHT - ImGui::GetStyle().FramePadding.y*2}; renderAvatar(_theme, _contact_tc, {_cr, c_from.c}, {img_y, img_y}); - ImGui::SameLine(); + ImGui::SameLine(0.f, ImGui::GetStyle().ItemSpacing.x*0.5f); if (_cr.all_of(c_from.c)) { ImGui::TextUnformatted(_cr.get(c_from.c).name.c_str());