mirror of
https://github.com/kunkundi/crossdesk.git
synced 2026-04-01 06:45: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)};
|
(int)(render_area_width * video_ratio_reverse)};
|
||||||
} else if (render_area_width > render_area_height * video_ratio) {
|
} else if (render_area_width > render_area_height * video_ratio) {
|
||||||
props->stream_render_rect_ = {
|
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)props->render_window_y_, (int)(render_area_height * video_ratio),
|
||||||
(int)render_area_height};
|
(int)render_area_height};
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -117,7 +117,9 @@ int Render::StreamWindow() {
|
|||||||
ImGui::SetWindowFontScale(0.6f);
|
ImGui::SetWindowFontScale(0.6f);
|
||||||
|
|
||||||
ImGui::SetNextWindowSize(
|
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);
|
ImGuiCond_Always);
|
||||||
ImGui::SetNextWindowPos(
|
ImGui::SetNextWindowPos(
|
||||||
ImVec2(0, fullscreen_button_pressed_ ? 0 : title_bar_height_),
|
ImVec2(0, fullscreen_button_pressed_ ? 0 : title_bar_height_),
|
||||||
@@ -217,7 +219,9 @@ int Render::StreamWindow() {
|
|||||||
|
|
||||||
if (props->tab_selected_) {
|
if (props->tab_selected_) {
|
||||||
ImGui::SetNextWindowSize(
|
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);
|
ImGuiCond_Always);
|
||||||
ImGui::SetNextWindowPos(ImVec2(0, 0), ImGuiCond_Always);
|
ImGui::SetNextWindowPos(ImVec2(0, 0), ImGuiCond_Always);
|
||||||
ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(0.0f, 0.0f));
|
ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(0.0f, 0.0f));
|
||||||
|
|||||||
Reference in New Issue
Block a user