summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorMarco Cecchetti <marco.cecchetti@collabora.com>2019-09-24 16:37:46 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-11-01 20:37:01 +0100
commit467429fe1dd0a7ab62e90234d71c3809ab270159 (patch)
tree9e4b749138e1cc24984812da126a181710c263ae /svx
parent56fe42d53a2ac7a1b9c0e4778383d8af25d5eae3 (diff)
tdf#126966: Use larger buttons for the colours in the sidebar on iOS - 2
Attempt to merge this with Noel's re-work of the color picker. Change-Id: I9687546889bc20ef95a50aeafbc6f40e939d57a9 Reviewed-on: https://gerrit.libreoffice.org/81755 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-on: https://gerrit.libreoffice.org/81900 Tested-by: Jenkins
Diffstat (limited to 'svx')
-rw-r--r--svx/source/tbxctrls/tbxcolorupdate.cxx16
1 files changed, 14 insertions, 2 deletions
diff --git a/svx/source/tbxctrls/tbxcolorupdate.cxx b/svx/source/tbxctrls/tbxcolorupdate.cxx
index 2069f61395f8..9465e9aad2f6 100644
--- a/svx/source/tbxctrls/tbxcolorupdate.cxx
+++ b/svx/source/tbxctrls/tbxcolorupdate.cxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#include <svx/tbxcolorupdate.hxx>
#include <svx/svxids.hrc>
#include <svx/xdef.hxx>
@@ -89,7 +88,19 @@ namespace svx
{
Image aImage(mpTbx->GetItemImage(mnBtnId));
Size aItemSize(mbWideButton ? mpTbx->GetItemContentSize(mnBtnId) : aImage.GetSizePixel());
-
+#ifdef IOS // tdf#126966
+ // Oddly enough, it is in the "not wide button" case that we want the larger ones, hmm.
+ if (!mbWideButton)
+ {
+ // usually the normal size is 16
+ const long nIOSSize = 40;
+ if (aItemSize.getWidth() < nIOSSize)
+ {
+ aItemSize.setWidth(nIOSSize);
+ aItemSize.setHeight(nIOSSize);
+ }
+ }
+#endif
const bool bSizeChanged = (maBmpSize != aItemSize);
const bool bDisplayModeChanged = (mbWasHiContrastMode != mpTbx->GetSettings().GetStyleSettings().GetHighContrastMode());
Color aColor(rColor);
@@ -100,6 +111,7 @@ namespace svx
if ((maCurColor == aColor) && !bSizeChanged && !bDisplayModeChanged && !bForceUpdate)
return;
+
if (!aItemSize.Width() || !aItemSize.Height())
return;