mvStyleVar_ItemSpacing shows results that exceed expectations
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 48/100
Research direction
Start by running the standalone Python example with Dear PyGui 2.3.1 and observe how mvStyleVar_ItemSpacing behaves after the theme is bound to child_window. Trace the theme-binding and child-window behavior around dpg.add_theme_style, then verify that spacing changes affect the child controls without changing the sibling input and buttons at the parent level.
Written by the indexing model from the issue text.
Description
Dear PyGui version:
2.3.1
Python version:
3.10.8
Operating system:
windows 11
My issue/question:
When adjusting the spacing of the sub-window, I found that, in addition to adjusting the styles within the sub-controls, it even pulled apart from the next control at the same level, which seemed unreasonable to me. My expected idea is that it will only apply to subclass controls.
Steps to reproduce:
1.run code
2.see child_window
Expected behavior:
I think it should only apply to subclasses.
Screenshots:
Standalone, minimal, complete and verifiable example:
import time
import dearpygui.dearpygui as dpg
dpg.create_context()
with dpg.theme(tag="theme_子窗口"):
with dpg.theme_component(dpg.mvAll):
dpg.add_theme_style(dpg.mvStyleVar_ItemSpacing, 8, 72, category=0)
with dpg.window(tag='窗口', width=793, height=500):
with dpg.child_window(label='1', tag='子窗口', height=223):
dpg.add_text(default_value='123', tag='纯文本')
dpg.add_text(default_value='123', tag='纯文本_(1)')
dpg.add_text(default_value='123', tag='纯文本_(2)')
dpg.add_text(default_value='123', tag='纯文本_(3)')
dpg.add_text(default_value='123', tag='纯文本_(4)')
dpg.add_text(default_value='123', tag='纯文本_(5)')
dpg.add_text(default_value='123', tag='纯文本_(6)')
dpg.bind_item_theme('子窗口', 'theme_子窗口')
dpg.add_input_text(tag='文本输入框')
dpg.add_button(tag='copy_普通按钮(1)')
dpg.add_button(tag='普通按钮')
dpg.create_viewport(title='main_UI', width=819, height=555,vsync=False)
dpg.setup_dearpygui()
dpg.show_viewport()
while dpg.is_dearpygui_running():
interval = 1 / 600
time.sleep(interval)
dpg.render_dearpygui_frame()
dpg.destroy_context()
- Dominant language
- C++
- Stars
- 15.7k
- Forks
- 790
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from hoffstadt/DearPyGui
-
Plot series data silently truncated to float32 when passed as numpy array (should be float64/double)Openstate: pending type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
state: pending type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
state: pending type: improvement
Difficulty 3/5 1-2 days Newbie friendliness 35/100
-
state: pending type: bug
Difficulty 4/5 3-5 days Newbie friendliness 42/100
-
state: pending type: improvement
Difficulty 5/5 Over a week Newbie friendliness 25/100
All issues in hoffstadt/DearPyGui
Similar issues
-
[Windows] Hidden title bar: a maximized window restored from minimized on a secondary monitor gets the primary monitor's work area as its client areaPossibly taken @lijy91 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
libnativeapi/nativeapi#53 · 1 reaction ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
Maintainers usually reply within 1 day
-
bot-triaged module: correctness (silent) module: fft triage review
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 68/100
patrickjquinn/Marathon-Shell#84 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 80/100
Maintainers usually reply within 1 day