From 8ca1e8e5a1e0591dd4e90d78f03143e908959639 Mon Sep 17 00:00:00 2001 From: dijunkun Date: Fri, 16 Aug 2024 09:35:09 +0800 Subject: [PATCH] [style] reset menu bar line size --- src/single_window/title_bar.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/single_window/title_bar.cpp b/src/single_window/title_bar.cpp index 7dda231..f222a76 100644 --- a/src/single_window/title_bar.cpp +++ b/src/single_window/title_bar.cpp @@ -24,7 +24,7 @@ int Render::TitleBar() { ImGui::PushStyleColor(ImGuiCol_HeaderActive, ImVec4(1.0f, 1.0f, 1.0f, 1.0f)); if (!streaming_) { - float bar_pos_x = ImGui::GetCursorPosX() + 7; + float bar_pos_x = ImGui::GetCursorPosX() + 6; float bar_pos_y = ImGui::GetCursorPosY() + 15; std::string menu_button = " "; // ICON_FA_BARS; if (ImGui::BeginMenu(menu_button.c_str())) { @@ -40,14 +40,15 @@ int Render::TitleBar() { ImGui::SetWindowFontScale(1.0f); ImGui::EndMenu(); } + float menu_bar_line_size = 15.0f; draw_list->AddLine(ImVec2(bar_pos_x, bar_pos_y - 6), - ImVec2(bar_pos_x + 12, bar_pos_y - 6), + ImVec2(bar_pos_x + menu_bar_line_size, bar_pos_y - 6), IM_COL32(0, 0, 0, 255)); draw_list->AddLine(ImVec2(bar_pos_x, bar_pos_y), - ImVec2(bar_pos_x + 12, bar_pos_y), + ImVec2(bar_pos_x + menu_bar_line_size, bar_pos_y), IM_COL32(0, 0, 0, 255)); draw_list->AddLine(ImVec2(bar_pos_x, bar_pos_y + 6), - ImVec2(bar_pos_x + 12, bar_pos_y + 6), + ImVec2(bar_pos_x + menu_bar_line_size, bar_pos_y + 6), IM_COL32(0, 0, 0, 255)); ImGui::PopStyleColor(2);