diff options
-rw-r--r-- | vcl/source/control/fixed.cxx | 8 | ||||
-rw-r--r-- | vcl/source/window/builder.cxx | 13 |
2 files changed, 21 insertions, 0 deletions
diff --git a/vcl/source/control/fixed.cxx b/vcl/source/control/fixed.cxx index 237f2f30e304..d64494e179a6 100644 --- a/vcl/source/control/fixed.cxx +++ b/vcl/source/control/fixed.cxx @@ -956,6 +956,14 @@ bool FixedImage::set_property(const OString &rKey, const OUString &rValue) { SetImage(loadThemeImage(rValue)); } + else if (rKey == "icon-size") + { + WinBits nBits = GetStyle(); + nBits &= ~WB_SMALLSTYLE; + if (rValue == "2") + nBits |= WB_SMALLSTYLE; + SetStyle(nBits); + } else return Control::set_property(rKey, rValue); return true; diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index caf1ec25c1e0..dd614b891fe9 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -667,7 +667,20 @@ VclBuilder::VclBuilder(vcl::Window* pParent, const OUString& sUIDir, const OUStr if (aFind == m_pParserState->m_aStockMap.end()) { if (!elem.m_bRadio) + { pTargetButton->SetModeImage(pImage->GetImage()); + if (pImage->GetStyle() | WB_SMALLSTYLE) + { + pTargetButton->SetStyle(pTargetButton->GetStyle() | WB_SMALLSTYLE); + Size aSz(pTargetButton->GetModeImage().GetSizePixel()); + aSz.AdjustWidth(6); + aSz.AdjustHeight(6); + if (pTargetButton->get_width_request() == -1) + pTargetButton->set_width_request(aSz.Width()); + if (pTargetButton->get_height_request() == -1) + pTargetButton->set_height_request(aSz.Height()); + } + } else pTargetRadio->SetModeRadioImage(pImage->GetImage()); } |