summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.com>2014-04-01 23:08:03 +0200
committerTomaž Vajngerl <tomaz.vajngerl@collabora.com>2014-04-03 12:19:37 +0200
commite748cf70977bbdd2d869bdeab1921ee68238dca4 (patch)
treea1a4fbe6bd5d5315f2229a83c20a06c942f69def
parenta4f09f8c2ef3ae82b86d1b4f0c6c90d1a61614fa (diff)
vcl: apply font height if defined as "size" attribute in .ui
Change-Id: I28719b16fb47a618420195640f4f75a79ca889ea
-rw-r--r--vcl/source/window/window2.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx
index 6b5b558a04b2..e2330a90eee2 100644
--- a/vcl/source/window/window2.cxx
+++ b/vcl/source/window/window2.cxx
@@ -1785,6 +1785,13 @@ bool Window::set_font_attribute(const OString &rKey, const OString &rValue)
aFont.SetUnderline(UNDERLINE_SINGLE);
SetControlFont(aFont);
}
+ else if (rKey == "size")
+ {
+ Font aFont(GetControlFont());
+ sal_Int32 nHeight = rValue.toInt32() / 1000;
+ aFont.SetHeight(nHeight);
+ SetControlFont(aFont);
+ }
else
{
SAL_INFO("vcl.layout", "unhandled font attribute: " << rKey.getStr());