hoffstadt / DearPyGui

Dear PyGui: A fast and powerful Graphical User Interface Toolkit for Python with minimal dependencies
https://dearpygui.readthedocs.io/en/latest/
MIT License
13.09k stars 680 forks source link

Typing problem, slowly and with warning #2357

Open riverklause opened 3 months ago

riverklause commented 3 months ago

Version of Dear PyGui

Version: 1.11.1 Operating System: Windows 11 build 22631.3810

My Issue/Question

when i typed chinese words with a chinese input software(sogou input method) in input_text box, the typing rate was very slowly. At the same time, i got a warning: "libpng warning: iCCP: known incorrect sRGB profile".(shown as picture 1) Then i change to Microsoft Chinese input software, i found the typing rate had a little improvement, and the warning “libpng warning: iCCP: known incorrect sRGB profile” was dispeared. But there was a new problem, the input method showed a different candidate word window. (shown as picture 2) The usually candidate word window was shown as picture 3.

Screenshots/Video

picture 1:

1

picture 2:

2

picture 3:

3

Here's some code anyone can copy and paste to reproduce your issue

mport dearpygui.dearpygui as dpg

dpg.create_context() with dpg.font_registry(): with dpg.font("C:\WINDOWS\FONTS\SIMYOU.TTF", 14) as font1: dpg.add_font_range_hint(dpg.mvFontRangeHint_Chinese_Full) dpg.bind_font(font1)

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

with dpg.window(label="Example Window"): dpg.add_text("Hello, world你好") dpg.add_button(label="Save") dpg.add_input_text(label="string", default_value="狐狸Quick brown fox") dpg.add_slider_float(label="float", default_value=0.273, max_value=1)

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

nehonpa commented 3 weeks ago

只要在dpg.create_viewport(vsync=False)加上这个关键字就能让你输入非常丝滑了,但是代价就是刷新率会非常高。