Skip to content

enh(ui): add option to fix the size of QToolButton on a toolbar

Description

Adds an option on Toolbar layout to resize buttons to the wider one.

This ensures to keep same size between each button and fix some glitches when larger button was hide / show.

Note: this appends especially when using Text under icon (or beside icon) option, and horizontal toolbar.

Closes #732 (closed)

How to test it?

  1. Use any application with a horizontal toolbar (Tuto14Gui)
  2. add option <layout style="ToolButtonTextUnderIcon" />
  3. Test with and without new option <layout ... uniformSize="true" />

Notice

If putting too much text under/beside an icon, all buttons will become very large, this MR isn't intended to fix misleading users.

One example of the previous notice is Tuto14Gui, some buttons as very large text, this leads to very large button with the uniformSize option set to true...

Some results

Show/Hide glitch if the new button doesn't have same size than the hidden one.

Toolbar_resize

With unifySize option:

toolbar_fix

Edited by Marc SCHWEITZER

Merge request reports