[Libreoffice-commits] core.git: svx/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Fri Jun 19 15:24:12 UTC 2020
svx/source/tbxctrls/tbxcolorupdate.cxx | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
New commits:
commit 3c17bb91f29d431f99a742bd14ffc9612f25a7af
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Jun 19 15:06:23 2020 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Fri Jun 19 17:23:29 2020 +0200
tdf#134084 use the desired image size, not the current image size
when updating the color bar
Change-Id: I6bf76a38adc034a25c0c31833c14f2b6afe3ec6d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96738
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/svx/source/tbxctrls/tbxcolorupdate.cxx b/svx/source/tbxctrls/tbxcolorupdate.cxx
index 31948678b7a7..f21ad6b9c0d0 100644
--- a/svx/source/tbxctrls/tbxcolorupdate.cxx
+++ b/svx/source/tbxctrls/tbxcolorupdate.cxx
@@ -120,8 +120,22 @@ namespace svx
{
if (mbWideButton)
return mpTbx->GetItemContentSize(mnBtnId);
- Image aImage(mpTbx->GetItemImage(mnBtnId));
- return aImage.GetSizePixel();
+ vcl::ImageType eImageType = GetImageSize();
+ int nHeight(16);
+ switch (eImageType)
+ {
+ case vcl::ImageType::Size16:
+ nHeight = 16;
+ break;
+ case vcl::ImageType::Size26:
+ nHeight = 26;
+ break;
+ case vcl::ImageType::Size32:
+ nHeight = 32;
+ break;
+ }
+ int nWidth = nHeight;
+ return Size(nWidth, nHeight);
}
ToolboxButtonColorUpdaterBase::~ToolboxButtonColorUpdaterBase()
More information about the Libreoffice-commits
mailing list