From 161408bf1e1cb06b282c44454672ee8087ebbe98 Mon Sep 17 00:00:00 2001 From: Colin Snover Date: Mon, 15 Jul 2024 01:15:17 -0500 Subject: [PATCH] feat: Improve appearance of OOB banner Rendering at a non-native resolution and then scaling the bitmap looks bad. The scaling seems to try to just get it to end up the same size as the welcome screen, so just use the same size for both. --- plugins/builtin/source/content/out_of_box_experience.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/builtin/source/content/out_of_box_experience.cpp b/plugins/builtin/source/content/out_of_box_experience.cpp index e32febaf21e66..eed34a7ba4b0f 100644 --- a/plugins/builtin/source/content/out_of_box_experience.cpp +++ b/plugins/builtin/source/content/out_of_box_experience.cpp @@ -76,7 +76,7 @@ namespace hex::plugin::builtin { // Draw banner ImGui::SetCursorPos(scaled({ 25 * bannerSlideIn, 25 })); - const auto bannerSize = s_imhexBanner.getSize() / (3.0F * (1.0F / ImHexApi::System::getGlobalScale())); + const auto bannerSize = s_imhexBanner.getSize(); ImGui::Image( s_imhexBanner, bannerSize, @@ -443,7 +443,7 @@ namespace hex::plugin::builtin { const auto imageTheme = ThemeManager::getImageTheme(); const auto scale = ImHexApi::System::getContentScale(); - s_imhexBanner = ImGuiExt::Texture::fromSVG(romfs::get(hex::format("assets/{}/banner.svg", imageTheme)).span(), 0, 0, scale); + s_imhexBanner = ImGuiExt::Texture::fromSVG(romfs::get(hex::format("assets/{}/banner.svg", imageTheme)).span(), 300_scaled, 0, scale); s_compassTexture = ImGuiExt::Texture::fromImage(romfs::get("assets/common/compass.png").span()); s_globeTexture = ImGuiExt::Texture::fromImage(romfs::get("assets/common/globe.png").span()); s_screenshotDescriptions = nlohmann::json::parse(romfs::get("assets/screenshot_descriptions.json").string());