fix: Position of restore layout button being wrong with different scalings

This commit is contained in:
WerWolv
2023-05-11 18:44:10 +02:00
parent 49371398bc
commit 2da89f4b9b

View File

@@ -428,10 +428,10 @@ namespace hex::plugin::builtin {
auto loadDefaultText = "hex.builtin.layouts.none.restore_default"_lang;
auto textSize = ImGui::CalcTextSize(loadDefaultText);
auto textPos = scaled(ImVec2(
auto textPos = ImVec2(
(ImGui::GetContentRegionAvail().x - textSize.x) / 2,
imagePos.y + imageSize.y
));
);
ImGui::SetCursorPos(textPos);
if (ImGui::DimmedButton(loadDefaultText)){