[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - svx/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Fri Jun 19 19:12:50 UTC 2020
svx/source/tbxctrls/tbxcolorupdate.cxx | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
New commits:
commit a3dec7a0b3714ff74c32c8cedc62a9aae6fb6b9b
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 21:12:13 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/+/96739
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