Changed: Ignore UI fontsize coef setting for html content.

--HG--
branch : html-improvements
hg/feature/html-improvements
Nimetu 5 years ago
parent cc437ef7a9
commit 379a7f0e98

@ -352,7 +352,7 @@ namespace NLGUI
void setMinH(sint32 minH);
// change fontsize for new menu items
void setFontSize(uint32 fontSize);
void setFontSize(uint32 fontSize, bool coef = true);
// Gray a line on the RootMenu
void setGrayedLine(uint line, bool g);
@ -392,6 +392,7 @@ namespace NLGUI
bool _Formatted;
uint8 _Space;
sint32 _FontSize;
bool _FontSizeCoef;
NLMISC::CRGBA _ColorOver; // Color of the text when the mouse is over it
NLMISC::CRGBA _ShadowColorOver; // Color of the shadow when the mouse is over it

@ -433,10 +433,9 @@ namespace NLGUI
{
if (pVT)
{
pVT->setFontSize(style.FontSize);
pVT->setColor(style.TextColor);
pVT->setFontName(style.FontFamily);
pVT->setFontSize(style.FontSize);
pVT->setFontSize(style.FontSize, false);
pVT->setEmbolden(style.FontWeight >= FONT_WEIGHT_BOLD);
pVT->setOblique(style.FontOblique);
pVT->setUnderlined(style.Underlined);
@ -6465,7 +6464,7 @@ namespace NLGUI
sb->setMinH(_Style.Current.Height);
sb->setMaxVisibleLine(size);
sb->setFontSize(_Style.Current.FontSize);
sb->setFontSize(_Style.Current.FontSize, false);
}
entry.SelectBox = sb;

@ -1221,7 +1221,7 @@ namespace NLGUI
pV->setText (name);
}
pV->setColor (_GroupMenu->_Color);
pV->setFontSize (_GroupMenu->_FontSize);
pV->setFontSize (_GroupMenu->_FontSize, _GroupMenu->_FontSizeCoef);
pV->setShadow (_GroupMenu->_Shadow);
pV->setShadowOutline (_GroupMenu->_ShadowOutline);
pV->setCheckable(checkable);
@ -1310,7 +1310,7 @@ namespace NLGUI
}
pV->setColor (_GroupMenu->_Color);
pV->setFontSize (_GroupMenu->_FontSize);
pV->setFontSize (_GroupMenu->_FontSize, _GroupMenu->_FontSizeCoef);
pV->setShadow (_GroupMenu->_Shadow);
pV->setShadowOutline (_GroupMenu->_ShadowOutline);
pV->setCheckable(checkable);
@ -1968,6 +1968,7 @@ namespace NLGUI
_ShadowColorGrayed = CRGBA::Black;
_HighLightOver.set(128, 0, 0, 255);
_FontSize = 12;
_FontSizeCoef = true;
_Shadow = false;
_ShadowOutline = false;
_ResizeFromChildH = _ResizeFromChildW = true;
@ -2562,9 +2563,10 @@ namespace NLGUI
}
// ------------------------------------------------------------------------------------------------
void CGroupMenu::setFontSize(uint fontSize)
void CGroupMenu::setFontSize(uint fontSize, bool coef)
{
_FontSize = fontSize;
_FontSizeCoef = coef;
}
// ------------------------------------------------------------------------------------------------

Loading…
Cancel
Save