Fix using addition instead of subtraction for right alignment of titlebar buttons.
Some checks failed
Build / build-deb (push) Blocked by required conditions
Build / build-appimage (push) Blocked by required conditions
Build / build-android (push) Blocked by required conditions
Build / build-windows (push) Blocked by required conditions
Build / build-gentoo (push) Successful in 2m15s
Build / download-system-deps (push) Successful in 5m49s
Build / get-source-code (push) Has been cancelled
Some checks failed
Build / build-deb (push) Blocked by required conditions
Build / build-appimage (push) Blocked by required conditions
Build / build-android (push) Blocked by required conditions
Build / build-windows (push) Blocked by required conditions
Build / build-gentoo (push) Successful in 2m15s
Build / download-system-deps (push) Successful in 5m49s
Build / get-source-code (push) Has been cancelled
This commit is contained in:
parent
553e8b58a5
commit
152ee66a04
1 changed files with 4 additions and 4 deletions
|
@ -508,11 +508,11 @@ void RendererBackend::EndMainMenuBar() {
|
|||
float padding = ImGui::GetStyle().FramePadding.x;
|
||||
float spacing = ImGui::GetStyle().ItemSpacing.x;
|
||||
for (size_t i = 0; i < titlebar_btn_count; i++) {
|
||||
tmp += padding;
|
||||
tmp -= padding;
|
||||
// No need to use the correct index, as long as this is hit only once.
|
||||
if (i == 0) tmp += spacing / 2;
|
||||
else tmp += spacing;
|
||||
tmp += ImGui::CalcTextSize(titlebar_icons[i]).x;
|
||||
if (i == 0) tmp -= spacing / 2.0f;
|
||||
else tmp -= spacing;
|
||||
tmp -= ImGui::CalcTextSize(titlebar_icons[i]).x;
|
||||
}
|
||||
title_btn_start = std::ceil(tmp);
|
||||
ImGui::SetCursorPosX(title_btn_start);
|
||||
|
|
Loading…
Reference in a new issue