Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ti.init(...) needlessly interferes with external GUI #6037

Open
prybicki opened this issue Sep 11, 2022 · 1 comment
Open

ti.init(...) needlessly interferes with external GUI #6037

prybicki opened this issue Sep 11, 2022 · 1 comment
Assignees
Labels
potential bug Something that looks like a bug but not yet confirmed welcome contribution

Comments

@prybicki
Copy link

prybicki commented Sep 11, 2022

Thank you for developing great software 🙇

When ti.init(...) is called (with no window setup), it unexpectedly changes appearance of a GUI program on a 4K screen, making everything smaller (no HiDPI scaling?).

Edit: the issue happens only on Windows. On Linux (Mint), DearPyGUI seems to ignore HiDPI scaling, so the effect of ti.init(...) is not visible.

Correct appearance, without calling ti.init(...)
image

Wrong appearance, after calling ti.init(...)
image

import dearpygui.dearpygui as dpg
import taichi as ti

# If uncommented, this line makes DearPyGUI smaller (no HiDPI scaling (?))
# ti.init(arch=ti.vulkan)

dpg.create_context()
dpg.create_viewport(title='Custom Title', width=400, height=300)

with dpg.window(label="Example Window"):
    dpg.add_text("Hello, world")

dpg.setup_dearpygui()
dpg.show_viewport()
dpg.start_dearpygui()
dpg.destroy_context()

Motivation
Since taichi's GUI does not satisfy my needs (no advanced widgets, such as charts), I attempted to use an external GUI (AFAIK most starred pythong GUI framework), however found it difficult to integrate them in a single app.

@prybicki prybicki added the potential bug Something that looks like a bug but not yet confirmed label Sep 11, 2022
@taichi-gardener taichi-gardener moved this to Untriaged in Taichi Lang Sep 11, 2022
@prybicki prybicki changed the title ti.init(...) needlessly inteferes with external GUI ti.init(...) needlessly interferes with external GUI Sep 11, 2022
@ailzhang ailzhang moved this from Untriaged to Todo in Taichi Lang Sep 16, 2022
@PENGUINLIONG
Copy link
Member

Hinting the GLFW window with GLFW_SCALE_TO_MONITOR could help. I could have a look at it a bit later but please feel free to contribute this change.

@erizmr erizmr moved this from Todo to Backlog in Taichi Lang Sep 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
potential bug Something that looks like a bug but not yet confirmed welcome contribution
Projects
Status: Backlog
Development

No branches or pull requests

2 participants