From aede4dbab7b9871772ed01ede1b361c2f6af174b Mon Sep 17 00:00:00 2001 From: Nimetu Date: Mon, 29 Apr 2019 15:03:55 +0300 Subject: [PATCH] Added: relative/absolute font size values for css --HG-- branch : develop --- code/nel/src/gui/css_style.cpp | 35 ++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/code/nel/src/gui/css_style.cpp b/code/nel/src/gui/css_style.cpp index 9d4b665bb..35d28717e 100644 --- a/code/nel/src/gui/css_style.cpp +++ b/code/nel/src/gui/css_style.cpp @@ -114,6 +114,41 @@ namespace NLGUI { style.FontSize = current.FontSize; } + else if (it->second == "x-small") + { + style.FontSize = 10; // 62.5% + } + else if (it->second == "small") + { + style.FontSize = 13; // 80%; + } + else if (it->second == "medium") + { + style.FontSize = 16; // 100%; + } + else if (it->second == "large") + { + style.FontSize = 18; // 112.5% + } + else if (it->second == "x-large") + { + style.FontSize = 24; // 150% + } + else if (it->second == "xx-large") + { + style.FontSize = 32; // 200%; + } + else if (it->second == "smaller") + { + if (style.FontSize < 5) + style.FontSize = 3; + else + style.FontSize -= 2; + } + else if (it->second == "larger") + { + style.FontSize += 2; + } else { std::string unit;