This commit is contained in:
@@ -122,7 +122,8 @@ StudioUI::StudioUI(turbine::Context &tctx, ox::StringParam projectDataDir) noexc
|
||||
m_sctx{*this, tctx},
|
||||
m_projectDataDir{std::move(projectDataDir)} {
|
||||
{
|
||||
auto const scale = turbine::isWayland() ? 1.f : turbine::scale(m_tctx);
|
||||
auto const scale = turbine::isWayland() || ox::defines::OS == ox::OS::Darwin ?
|
||||
1.f : turbine::scale(m_tctx);
|
||||
ImFontConfig fontCfg;
|
||||
fontCfg.FontDataOwnedByAtlas = false;
|
||||
auto const &io = ImGui::GetIO();
|
||||
@@ -202,10 +203,10 @@ void StudioUI::handleNavigationChange(ox::StringParam path, ox::StringParam navA
|
||||
}
|
||||
|
||||
void StudioUI::draw() noexcept {
|
||||
if (!turbine::isWayland()) {
|
||||
ig::setDpiScale(ImGui::GetWindowDpiScale());
|
||||
} else {
|
||||
if (turbine::isWayland() || ox::defines::OS == ox::OS::Darwin) {
|
||||
ig::setDpiScale(1.f);
|
||||
} else {
|
||||
ig::setDpiScale(ImGui::GetWindowDpiScale());
|
||||
}
|
||||
glutils::clearScreen();
|
||||
drawMenu();
|
||||
|
||||
@@ -376,7 +376,8 @@ ox::Result<ox::UPtr<Context>> init(
|
||||
themeImgui();
|
||||
float xscale{}, yscale{};
|
||||
glfwGetWindowContentScale(ctx->window, &xscale, &yscale);
|
||||
ctx->scale = isWayland() ? 1.f : ox::max(xscale, yscale);
|
||||
ctx->scale = isWayland() || ox::defines::OS == ox::OS::Darwin ?
|
||||
1.f : ox::max(xscale, yscale);
|
||||
io.DisplayFramebufferScale = ImVec2{ctx->scale, ctx->scale};
|
||||
auto &style = ImGui::GetStyle();
|
||||
style.ScaleAllSizes(ctx->scale);
|
||||
|
||||
Reference in New Issue
Block a user