DPG eats one pixel on resize (not constant behaviour)

Open
#2,519 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
cpp, python
Domain
desktop

Research direction

Start by running the minimal Python example on Windows 10 and observe the viewport resize callback while resizing an empty application. Trace the Dear PyGui viewport resize handling and compare reported dimensions with the actual window size; done means resizing no longer inconsistently loses one pixel.

Written by the indexing model from the issue text.

Description

state: pending type: bug

Version of Dear PyGui

Version: 2.0.0
Operating System: Windows 10

My Issue/Question

With a simple and empty application, by just clicking to resize the app, sometimes the library eats one pixel.

Screenshots/Video

https://github.com/user-attachments/assets/687653a0-0a49-45ab-bc0c-31500f064497

Minimal example

import dearpygui.dearpygui as dpg

dpg.create_context()

def resize_callback(_, d):
    print(d)

dpg.set_viewport_resize_callback(resize_callback)
dpg.create_viewport(width = 400, height = 300)
dpg.setup_dearpygui()
dpg.show_viewport()
dpg.start_dearpygui()
dpg.destroy_context()
Dominant language
C++
Stars
15.7k
Forks
790
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from hoffstadt/DearPyGui

All issues in hoffstadt/DearPyGui

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.