SARibbon 2.5.1
SARibbon wiki
载入中...
搜索中...
未找到
SARibbonToolButton::LayoutFactor结构体 参考

Layout factor structure for fine-tuning button appearance / 用于微调按钮外观的布局系数结构体 更多...

#include <SARibbonToolButton.h>

Public 属性

qreal twoLineHeightFactor { 2.05 }
 Coefficient for the height of two-line text in large button mode / 大按钮模式下,两行文本高度系数
 
qreal oneLineHeightFactor { 1.2 }
 Coefficient for the height of single-line text in large button mode / 大按钮模式下,单行文本高度系数
 
qreal buttonMaximumAspectRatio { 1.4 }
 Maximum aspect ratio (width/height) for the button / 按钮最大宽高比
 

详细描述

Layout factor structure for fine-tuning button appearance / 用于微调按钮外观的布局系数结构体

类成员变量说明

◆ buttonMaximumAspectRatio

qreal SARibbonToolButton::LayoutFactor::buttonMaximumAspectRatio { 1.4 }

Maximum aspect ratio (width/height) for the button / 按钮最大宽高比

The maximum width of the button is determined by its height multiplied by this coefficient. For example, if the button height is h, then the maximum width is maxw = h * buttonMaximumAspectRatio. If the text cannot be fully displayed within this width, the button will not expand further horizontally, and ellipsis (...) will be used to indicate truncated text.

按钮的最大宽度为按钮高度*此系数,例如按钮高度为h,那么按钮最大宽度maxw=h*buttonMaximumAspectRatio 如果在此宽度下文字还无法完全显示,那么按钮将不会继续横向扩展,将使用...替代未完全显示的文字

@default 1.4

◆ oneLineHeightFactor

qreal SARibbonToolButton::LayoutFactor::oneLineHeightFactor { 1.2 }

Coefficient for the height of single-line text in large button mode / 大按钮模式下,单行文本高度系数

This coefficient determines the line height for single-line text. Single-line text area height = fontMetrics.lineSpacing * coefficient.

这个系数决定了单行文本的行高度。 单行文本区域高度 = fontMetrics.lineSpacing*系数

注解
This value should be greater than 1. / 此值应该大于1 @default 1.2

◆ twoLineHeightFactor

qreal SARibbonToolButton::LayoutFactor::twoLineHeightFactor { 2.05 }

Coefficient for the height of two-line text in large button mode / 大按钮模式下,两行文本高度系数

This coefficient determines the height of the rectangle for two-line text when word wrapping is enabled. Two-line text area height = fontMetrics.lineSpacing * coefficient.

这个系数决定了文字换行时2行文本的矩形高度。 两行文本区域高度 = fontMetrics.lineSpacing*系数

注解
This value should be greater than 2. / 此值应该大于2 @default 2.05

该结构体的文档由以下文件生成: