hoffstadt / hoffstadt/DearPyGui
Cannot edit `mvStyleVar_DisplaySafeAreaPadding` outside of style editor
- Dominant language
- C++
- Stars
- 15.6k
- Forks
- 783
- PR merge metrics
- No merged PRs in 30d
Description
## Version of Dear PyGui
Version: 1.8.0
Operating System: Windows 10, Fedora 36 KDE
## My Issue/Question
The style editor lists `mvStyleVar_DisplaySafeAreaPadding` with defaults at (3,3) and ranges from (0,0) to (30,30). It appears to affect popups, which will try to stay this distance away from the edge of the viewport. Editing it through the style editor works as expected, but it isn't listed in docs and cannot be permanently edited.
## To Reproduce
1. Open the style editor using `dpg.show_style_editor()` and find the "Safe Area Padding" category, which only contains the `mvStyleVar_DisplaySafeAreaPadding` variable. Change the values as desired.
2. Create a popup window that touches the edge of the viewport, such as (0,0)
3. Notice that is it offset from the provided coordinates using values from `mvStyleVar_DisplaySafeAreaPadding`
4. Create a global theme, and try to change the variable using `dpg.add_theme_style()`
> AttributeError: module 'dearpygui.dearpygui' has no attribute 'mvStyleVar_DisplaySafeAreaPadding'
## Expected behavior
The style variable can be changed using `dpg.add_theme_style()`.
## Screenshots/Video


## Standalone, minimal, complete and verifiable example
```python
import dearpygui.dearpygui as dpg
dpg.create_context()
dpg.create_viewport()
dpg.setup_dearpygui()
# with dpg.theme() as theme:
# with dpg.theme_component(dpg.mvAll):
# dpg.add_theme_style(dpg.mvStyleVar_DisplaySafeAreaPadding, 0, category=dpg.mvThemeCat_Core)
# dpg.bind_theme(theme)
dpg.show_style_editor()
with dpg.window(pos=(0,200), no_close=True):
dpg.add_button(label="Show popup", callback=lambda: dpg.add_window(pos=(0,0), popup=True))
dpg.show_viewport()
dpg.start_dearpygui()
dpg.destroy_context()
```
Contributor guide
Assessment
This issue has not been assessed yet.