mirror of
https://github.com/kunkundi/crossdesk.git
synced 2025-10-26 20:25:34 +08:00
[fix] fix control bar initial postion
This commit is contained in:
@@ -16,16 +16,15 @@ int Render::ControlWindow() {
|
||||
: control_window_max_width_;
|
||||
|
||||
ImGui::PushStyleColor(ImGuiCol_WindowBg, ImVec4(0, 0, 0, 0));
|
||||
// ImGui::PushStyleVar(ImGuiStyleVar_WindowBorderSize, 0);
|
||||
// ImGui::PushStyleVar(ImGuiStyleVar_ChildBorderSize, 0);
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(0, 0));
|
||||
ImGui::SetNextWindowPos(ImVec2(0, title_bar_height_), ImGuiCond_Once);
|
||||
ImGui::SetNextWindowSize(
|
||||
ImVec2(control_window_width + 10, control_window_height_ + 10),
|
||||
ImGuiCond_Always);
|
||||
ImGui::SetNextWindowSize(ImVec2(control_window_width, control_window_height_),
|
||||
ImGuiCond_Always);
|
||||
ImGui::Begin("ControlWindow", nullptr,
|
||||
ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize |
|
||||
ImGuiWindowFlags_NoScrollbar |
|
||||
ImGuiWindowFlags_NoBringToFrontOnFocus);
|
||||
ImGui::PopStyleVar();
|
||||
|
||||
ImGui::PushStyleColor(ImGuiCol_ChildBg, ImVec4(1.0f, 1.0f, 1.0f, 1.0f));
|
||||
static bool a, b, c, d, e;
|
||||
@@ -43,7 +42,6 @@ int Render::ControlWindow() {
|
||||
ImGui::EndChild();
|
||||
|
||||
ImGui::End();
|
||||
// ImGui::PopStyleVar();
|
||||
ImGui::PopStyleColor();
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user