summaryrefslogtreecommitdiff
path: root/vcl/source/helper
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2016-10-30 16:24:37 +0100
committerTomaž Vajngerl <quikee@gmail.com>2016-10-30 18:00:05 +0000
commitb1426b5b502fd591402d666994e3f1fb3a8ad959 (patch)
tree3614d896993b004e805f9714a126070ec5d5c29f /vcl/source/helper
parent17b1ebbf86ceabe2e9cabf9626ca94fae3fb9216 (diff)
tdf#95014 initial support for 32 px icons in toolbar
This adds support for 32 pixel icons - mainly to get them into the toolbar. Most changes made are to change the behavior of having only small and large icons as a boolean choice, but not every code path was converted to non-boolean choice yet. Breeze icon theme has the 32px variants so it can be used already. Change-Id: Iadf832a87826c16b3a83522104dd6c35d61a0f87 Reviewed-on: https://gerrit.libreoffice.org/30398 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'vcl/source/helper')
-rw-r--r--vcl/source/helper/commandinfoprovider.cxx10
1 files changed, 7 insertions, 3 deletions
diff --git a/vcl/source/helper/commandinfoprovider.cxx b/vcl/source/helper/commandinfoprovider.cxx
index 2b23821fc7f7..764326027707 100644
--- a/vcl/source/helper/commandinfoprovider.cxx
+++ b/vcl/source/helper/commandinfoprovider.cxx
@@ -211,8 +211,9 @@ OUString CommandInfoProvider::GetRealCommandForCommand(const OUString& rCommandN
return GetCommandProperty("TargetURL", rCommandName);
}
-Image CommandInfoProvider::GetImageForCommand(const OUString& rsCommandName, bool bLarge,
- const Reference<frame::XFrame>& rxFrame)
+Image CommandInfoProvider::GetImageForCommand(const OUString& rsCommandName,
+ const Reference<frame::XFrame>& rxFrame,
+ vcl::ImageType eImageType)
{
SetFrame(rxFrame);
@@ -220,8 +221,11 @@ Image CommandInfoProvider::GetImageForCommand(const OUString& rsCommandName, boo
return Image();
sal_Int16 nImageType(ui::ImageType::COLOR_NORMAL | ui::ImageType::SIZE_DEFAULT);
- if (bLarge)
+
+ if (eImageType == vcl::ImageType::Size26)
nImageType |= ui::ImageType::SIZE_LARGE;
+ else if (eImageType == vcl::ImageType::Size32)
+ nImageType |= ui::ImageType::SIZE_32;
try
{