Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@aaronkirkham
Copy link
Contributor

Hey,

After using the very limited styling options for the old drag-drop target rect for as long as I can remember - I decided it was time to finally add some semi-useful options so I can achieve the look I wanted.

This PR adds three new style variables and a color. These new variables/color are defaulted to their old, previously hard-coded values so nothing will change visually unless you explicitly change these new options.

Here's a quick look at what is possible, and the code I'm using to achieve it

Before
before

After
after

style->DragDropTargetRectRounding      = style->FrameRounding;
style->DragDropTargetRectExpansionSize = 1.0f;
style->DragDropTargetRectLineThickness = 2.0f;

colors[ImGuiCol_DragDropTarget]   = ImVec4(0.26f, 0.59f, 0.98f, 1.00f);
colors[ImGuiCol_DragDropTargetBg] = ImVec4(0.26f, 0.59f, 0.98f, 0.25f);

Happy to take feedback and make changes on the naming of these variables.

@ocornut ocornut added style drag drop drag and drop labels Nov 5, 2025
ocornut added a commit that referenced this pull request Nov 6, 2025
@ocornut
Copy link
Owner

ocornut commented Nov 6, 2025

Thank you for your PR.
I have merged this as 7954d67 + various changes and renaming f45adb9.

@ocornut ocornut closed this Nov 6, 2025
Intrets pushed a commit to Intrets/imgui that referenced this pull request Jan 1, 2026
Intrets pushed a commit to Intrets/imgui that referenced this pull request Jan 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

drag drop drag and drop style

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants