diff options
author | Marco Cecchetti <marco.cecchetti@collabora.com> | 2019-09-24 16:37:46 +0200 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2019-10-30 11:05:42 +0000 |
commit | 94e24224ae0648b083710c18a8783236eb21afe5 (patch) | |
tree | dc5f9718db053513747e7c357b392a839b451c84 | |
parent | f5b3a8565b9683a06c4bf9725b1bbae6b75e6d56 (diff) |
tdf#126966: Use larger buttons for the colours in the sidebar on iOS - 2
ref/for/distro/collabora/cp-6.2
Attempt to merge this with Noel's re-work of the color picker.
Change-Id: I9687546889bc20ef95a50aeafbc6f40e939d57a9
-rw-r--r-- | svx/source/tbxctrls/tbxcolorupdate.cxx | 16 | ||||
-rw-r--r-- | vcl/source/window/toolbox.cxx | 3 |
2 files changed, 17 insertions, 2 deletions
diff --git a/svx/source/tbxctrls/tbxcolorupdate.cxx b/svx/source/tbxctrls/tbxcolorupdate.cxx index 45558e51b533..77385d58e400 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; diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx index 9ba57c20ad08..9fce6175fead 100644 --- a/vcl/source/window/toolbox.cxx +++ b/vcl/source/window/toolbox.cxx @@ -1413,6 +1413,9 @@ bool ToolBox::ImplCalcItem() long nMinWidth = 6; long nMinHeight = 6; long nDropDownArrowWidth = TB_DROPDOWNARROWWIDTH; +#ifdef IOS + nDropDownArrowWidth *= 3; +#endif // set defaults if image or text is needed but empty nDefWidth = GetDefaultImageSize().Width(); |