hoffstadt / hoffstadt/DearPyGui

mvStyleVar_ItemSpacing shows results that exceed expectations

Open
#2,657 1 comment 0 reactions 0 assignees View on GitHub
state: pending type: bug
Dominant language
C++
Stars
15.6k
Forks
783
PR merge metrics
No merged PRs in 30d

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:

Image

### Standalone, minimal, complete and verifiable example:

```python
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()
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.