Skip to content

A few additions to the Button class#171

Open
palszasz wants to merge 1 commit intomitsuba-renderer:masterfrom
palszasz:feature/a_few_additions_to_the_button_class
Open

A few additions to the Button class#171
palszasz wants to merge 1 commit intomitsuba-renderer:masterfrom
palszasz:feature/a_few_additions_to_the_button_class

Conversation

@palszasz
Copy link

  • Added “flat” attribute: if set, the button background and outline is not rendered (except the outline is rendered when the mouse is hovering above it). This can be used to remove UI clutter.
  • Added attributes for the button padding. This allows to create more compact buttons, without setting a fixed size.
  • Note that the new attributes should not increase sizeof(Button), since they were inserted in wasted space due to alignment (and that’s one reason why the padding is stored in 8-bit: it’s still big enough, but we don’t waste additional space... assuming bool is one byte)

* Added “flat” attribute: if set, the button background and outline is
  not rendered (except the outline is rendered when the mouse is
  hovering above it). This can be used to remove UI clutter.
* Added attributes for the button padding. This allows to create more
  compact buttons, without setting a fixed size.
* Note that the new attributes should not increase sizeof(Button), since
  they were inserted in wasted space due to alignment (and that’s one
  reason why the padding is stored in 8-bit: it’s still big enough, but
  we don’t waste additional space... assuming bool is one byte)
@wjakob wjakob force-pushed the master branch 9 times, most recently from 654b8a5 to 1cbff2e Compare August 29, 2025 18:29
@wjakob wjakob force-pushed the master branch 20 times, most recently from e9b125b to 54dc5d6 Compare September 4, 2025 23:58
@wjakob wjakob force-pushed the master branch 5 times, most recently from c75898b to 1bbd038 Compare September 6, 2025 21:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant