Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Border for individual elements? #1031

Closed
colesnicov opened this issue Feb 20, 2017 · 5 comments
Closed

Border for individual elements? #1031

colesnicov opened this issue Feb 20, 2017 · 5 comments
Labels

Comments

@colesnicov
Copy link

Hi Omar, again :-)

Maybe it just do not understand, maybe it is a good idea for the next innovation...

Now is the moment I have encountered while trying to the highlighted button at BeginChild. Here are the facts:

  • Begin (... ImGuiWindowFlags_ShowBorders) does not display the border with BeginChild. And their content as buttons, are also no borders ... I have also set in BeginChild ImGuiWindowFlags_ShowBorders.
  • If you want to have at the Button or ImageButton a border, I need to Begin[Child] set flags on ImGuiWindowFlags_ShowBorders but after that is bounded on any element, which is undesirable.

Question: How to set borders for individual elements??

@colesnicov
Copy link
Author

Hrrr,
Any hints?

@ocornut
Copy link
Owner

ocornut commented Feb 24, 2017

Enable the border at all time and manipulate the border color with PushStyleCol(), PopStyleCol().

@colesnicov
Copy link
Author

#819

@ocornut ocornut added the style label Oct 25, 2017
@ocornut
Copy link
Owner

ocornut commented Oct 25, 2017

Flagged as style, when I revamp the style system some of the change would include specifying border per type of element, similarly to how you can specify background colors.

ocornut added a commit that referenced this issue Nov 19, 2017
…rs are now fully set up in the ImGuiStyle structure (see e.g. style.FrameBorderSize, style.WindowBorderSize). Use ImGui::ShowStyleEditor() to look them up. (#707, fix #819, #1031, ref #1019, ref #447)
@ocornut
Copy link
Owner

ocornut commented Nov 19, 2017

@colesnicov Pushed changes today so you can now freely alter the border size style.FrameBorderSize with e.g. ImGui::PushStyleVar(ImGuiStyleVar_FrameBorderSize, 1.0f). The ImGuiWindowFlags_ShowBorders flag has been completely obsoleted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants