mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Set a lower limit to available font size
This commit is contained in:
parent
0709056d30
commit
664dc03c5b
@ -47,6 +47,8 @@
|
||||
namespace caf
|
||||
{
|
||||
|
||||
const int FontTools::MIN_FONT_SIZE = 6;
|
||||
|
||||
template <>
|
||||
void FontTools::FontSizeEnum::setUp()
|
||||
{
|
||||
@ -132,8 +134,11 @@ QList<PdmOptionItemInfo> FontTools::relativeSizeValueOptions(FontSize normalPoin
|
||||
QString uiText = RelativeSizeEnum::uiTextFromIndex(i);
|
||||
RelativeSize relSize = RelativeSizeEnum::fromIndex(i);
|
||||
int absolutePointSize = FontTools::absolutePointSize(normalPointSize, relSize);
|
||||
if (absolutePointSize >= MIN_FONT_SIZE)
|
||||
{
|
||||
uiText += QString(" (%1 pt)").arg(absolutePointSize);
|
||||
options.push_back(PdmOptionItemInfo(uiText, relSize));
|
||||
}
|
||||
}
|
||||
return options;
|
||||
}
|
||||
|
@ -54,10 +54,11 @@ namespace caf
|
||||
class FontTools
|
||||
{
|
||||
public:
|
||||
static const int MIN_FONT_SIZE;
|
||||
|
||||
enum class FontSize
|
||||
{
|
||||
INVALID = -1,
|
||||
MIN_FONT_SIZE = 8,
|
||||
FONT_SIZE_8 = 8,
|
||||
FONT_SIZE_10 = 10,
|
||||
FONT_SIZE_12 = 12,
|
||||
|
Loading…
Reference in New Issue
Block a user