Skip to content

Support for Selective Corner Rounding #9489

Description

@Talbe1

Version/Branch of Dear ImGui:

Version 1.92.801, Branch: imgui_bundle

Back-ends:

Unapplicable

Compiler, OS:

Kubuntu 26.04 LTS, Windows 11 (Python using ImGui Bundle)

Full config/build information:

No response

Details:

I apologize if this feature request is inapplicable, I program in Python (3.10) using ImGui Bundle (1.92.801).
I am aware a similar issue already exists: #2057

The difficulty leading to this feature request:
I'm looking forward to making a Combo like widget where I can input text (using InputText) and have the combo popup. The end goal is to have a filter I can type into and will show matching results.

I started trying out things and got to a working result that mimics the look of the Combo, but wanted it to look exactly like it.

What I aimed for (screenshot taken from Pthom's Interactive Explorer):
Image
What I currently have (notice the rounding between the input text and the arrow button):
Image

What I was missing, was an easy way to make it so that:
The input text on the left side, has its left corners rounded, and right ones sharp.
The arrow button on the right, has its right corners rounded, and left ones sharp.

The feature I wish for:
The ability to selectively round corners for a widget.
Possibly using the push and pop style methods to round specific corner(s) each time.

Reasons for this request:

  1. To have a consistent style of widgets in my application.
  2. Having user input with a combo is a very common feature from what I've seen.
  3. I wish to not have input text and combo widgets separately on the screen, as they take significantly more space.
  4. I do not want to call the internal API functions of ImGui, which will complicate my code and possibly cause other issues. I did look at the source code (of BeginCombo) and attempted replicating and tweaking the combo widget in Python.

Screenshots/Video:

No response

Minimal, Complete and Verifiable Example code:

No response

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions