Ribbon Size Settings¶
SARibbon allows you to finely adjust the height and spacing of various parts.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | |
Different sizes can be combined to produce different display effects, especially for the display requirements of icon sizes. Unlike toolbars that set a fixed icon size, the icons of SARibbon are determined by the height of the ribbonBar and the height of the text. When SARibbon is laid out, the icon size is determined according to the CategoryHeight and the text height. Therefore, there are two ways to make the icons larger:
- Adjust
CategoryHeightto increase the height of the ribbonbar. With the font unchanged, the icons will become larger. - Adjust the font line wrap mode (
SARibbonBar::setEnableWordWrap). In double-line mode, if text wrapping is disabled, the icons will become larger while the height of the ribbonbar remains unchanged.
How to set the size of each component can be dynamically adjusted through the Size tab of the example/MainWindowExample example, and the effect can be viewed.
