mirror of
https://github.com/kunkundi/crossdesk.git
synced 2026-03-22 07:37:29 +08:00
[fix] fix stream window rendering height
This commit is contained in:
@@ -2051,7 +2051,8 @@ void Render::UpdateRenderRect() {
|
||||
(int)(render_area_width * video_ratio_reverse)};
|
||||
} else if (render_area_width > render_area_height * video_ratio) {
|
||||
props->stream_render_rect_ = {
|
||||
(int)abs(render_area_width - render_area_height * video_ratio) / 2,
|
||||
(int)abs(render_area_width - render_area_height * video_ratio) / 2 +
|
||||
(int)props->render_window_x_,
|
||||
(int)props->render_window_y_, (int)(render_area_height * video_ratio),
|
||||
(int)render_area_height};
|
||||
} else {
|
||||
|
||||
@@ -117,7 +117,9 @@ int Render::StreamWindow() {
|
||||
ImGui::SetWindowFontScale(0.6f);
|
||||
|
||||
ImGui::SetNextWindowSize(
|
||||
ImVec2(stream_window_width_, stream_window_height_),
|
||||
ImVec2(stream_window_width_,
|
||||
stream_window_height_ -
|
||||
(fullscreen_button_pressed_ ? 0 : title_bar_height_)),
|
||||
ImGuiCond_Always);
|
||||
ImGui::SetNextWindowPos(
|
||||
ImVec2(0, fullscreen_button_pressed_ ? 0 : title_bar_height_),
|
||||
@@ -217,7 +219,9 @@ int Render::StreamWindow() {
|
||||
|
||||
if (props->tab_selected_) {
|
||||
ImGui::SetNextWindowSize(
|
||||
ImVec2(stream_window_width_, stream_window_height_),
|
||||
ImVec2(stream_window_width_,
|
||||
stream_window_height_ -
|
||||
(fullscreen_button_pressed_ ? 0 : title_bar_height_)),
|
||||
ImGuiCond_Always);
|
||||
ImGui::SetNextWindowPos(ImVec2(0, 0), ImGuiCond_Always);
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(0.0f, 0.0f));
|
||||
|
||||
Reference in New Issue
Block a user