mirror of
https://github.com/kunkundi/crossdesk.git
synced 2025-10-26 20:25:34 +08:00
[fix] fix imgui layout error
This commit is contained in:
@@ -302,7 +302,6 @@ int Render::LocalWindow() {
|
||||
}
|
||||
|
||||
ImGui::EndChild();
|
||||
ImGui::PopStyleVar();
|
||||
}
|
||||
|
||||
ImGui::EndChild();
|
||||
|
||||
@@ -518,25 +518,37 @@ int Render::Run() {
|
||||
ImGui::PopStyleColor();
|
||||
|
||||
TitleBar();
|
||||
}
|
||||
|
||||
if (connection_established_ && streaming_ && is_client_mode_) {
|
||||
if (!resizable_) {
|
||||
resizable_ = !resizable_;
|
||||
SDL_SetWindowResizable(main_window_, SDL_TRUE);
|
||||
if (connection_established_ && streaming_ && is_client_mode_) {
|
||||
if (!resizable_) {
|
||||
resizable_ = !resizable_;
|
||||
SDL_SetWindowResizable(main_window_, SDL_TRUE);
|
||||
}
|
||||
ControlWindow();
|
||||
} else {
|
||||
if (resizable_) {
|
||||
resizable_ = !resizable_;
|
||||
SDL_SetWindowResizable(main_window_, SDL_FALSE);
|
||||
}
|
||||
MainWindow();
|
||||
}
|
||||
|
||||
ControlWindow();
|
||||
} else {
|
||||
if (resizable_) {
|
||||
resizable_ = !resizable_;
|
||||
SDL_SetWindowResizable(main_window_, SDL_FALSE);
|
||||
}
|
||||
MainWindow();
|
||||
}
|
||||
|
||||
if (!fullscreen_button_pressed_) {
|
||||
ImGui::End();
|
||||
} else {
|
||||
if (connection_established_ && streaming_ && is_client_mode_) {
|
||||
if (!resizable_) {
|
||||
resizable_ = !resizable_;
|
||||
SDL_SetWindowResizable(main_window_, SDL_TRUE);
|
||||
}
|
||||
|
||||
ControlWindow();
|
||||
} else {
|
||||
if (resizable_) {
|
||||
resizable_ = !resizable_;
|
||||
SDL_SetWindowResizable(main_window_, SDL_FALSE);
|
||||
}
|
||||
MainWindow();
|
||||
}
|
||||
}
|
||||
|
||||
// create connection
|
||||
|
||||
@@ -48,7 +48,6 @@ int Render::TitleBar() {
|
||||
draw_list->AddLine(ImVec2(bar_pos_x, 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);
|
||||
|
||||
{
|
||||
SettingWindow();
|
||||
@@ -56,6 +55,8 @@ int Render::TitleBar() {
|
||||
}
|
||||
}
|
||||
|
||||
ImGui::PopStyleColor(2);
|
||||
|
||||
ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(0, 0, 0, 0));
|
||||
ImGui::SetCursorPosX(main_window_width_ - (streaming_
|
||||
? BUTTON_PADDING * 3
|
||||
@@ -146,11 +147,13 @@ int Render::TitleBar() {
|
||||
|
||||
ImGui::PopStyleColor(2);
|
||||
|
||||
ImGui::PopStyleColor(1);
|
||||
ImGui::PopStyleColor();
|
||||
}
|
||||
|
||||
ImGui::EndMenuBar();
|
||||
ImGui::SetWindowFontScale(1.0f);
|
||||
|
||||
ImGui::EndChild();
|
||||
ImGui::PopStyleColor(2);
|
||||
ImGui::PopStyleColor();
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user