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