mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-27 09:36:15 +00:00
Changed: CSS inherit value for some properties
This commit is contained in:
parent
76c8a8a055
commit
31938b3ce1
1 changed files with 20 additions and 6 deletions
|
@ -5587,6 +5587,10 @@ namespace NLGUI
|
||||||
for (it=styles.begin(); it != styles.end(); ++it)
|
for (it=styles.begin(); it != styles.end(); ++it)
|
||||||
{
|
{
|
||||||
if (it->first == "font-size")
|
if (it->first == "font-size")
|
||||||
|
{
|
||||||
|
if (it->second == "inherit")
|
||||||
|
style.FontSize = getFontSize();
|
||||||
|
else
|
||||||
{
|
{
|
||||||
float tmp;
|
float tmp;
|
||||||
sint size = 0;
|
sint size = 0;
|
||||||
|
@ -5594,9 +5598,13 @@ namespace NLGUI
|
||||||
if (size > 0)
|
if (size > 0)
|
||||||
style.FontSize = size;
|
style.FontSize = size;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
if (it->first == "font-style")
|
if (it->first == "font-style")
|
||||||
{
|
{
|
||||||
|
if (it->second == "inherit")
|
||||||
|
style.FontOblique = getFontOblique();
|
||||||
|
else
|
||||||
if (it->second == "italic" || it->second == "oblique")
|
if (it->second == "italic" || it->second == "oblique")
|
||||||
style.FontOblique = true;
|
style.FontOblique = true;
|
||||||
}
|
}
|
||||||
|
@ -5605,6 +5613,9 @@ namespace NLGUI
|
||||||
{
|
{
|
||||||
// https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight
|
// https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight
|
||||||
uint weight = 400;
|
uint weight = 400;
|
||||||
|
if (it->second == "inherit")
|
||||||
|
weight = getFontWeight();
|
||||||
|
else
|
||||||
if (it->second == "normal")
|
if (it->second == "normal")
|
||||||
weight = 400;
|
weight = 400;
|
||||||
else
|
else
|
||||||
|
@ -5637,6 +5648,9 @@ namespace NLGUI
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
if (it->first == "color")
|
if (it->first == "color")
|
||||||
|
if (it->second == "inherit")
|
||||||
|
style.TextColor = getTextColor();
|
||||||
|
else
|
||||||
scanHTMLColor(it->second.c_str(), style.TextColor);
|
scanHTMLColor(it->second.c_str(), style.TextColor);
|
||||||
else
|
else
|
||||||
if (it->first == "text-decoration" || it->first == "text-decoration-line")
|
if (it->first == "text-decoration" || it->first == "text-decoration-line")
|
||||||
|
|
Loading…
Reference in a new issue