diff options
-rw-r--r-- | vcl/source/control/spinfld.cxx | 6 | ||||
-rw-r--r-- | vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx | 4 |
2 files changed, 7 insertions, 3 deletions
diff --git a/vcl/source/control/spinfld.cxx b/vcl/source/control/spinfld.cxx index 15ae57f4042a..972bded96429 100644 --- a/vcl/source/control/spinfld.cxx +++ b/vcl/source/control/spinfld.cxx @@ -667,7 +667,7 @@ void SpinField::ImplCalcButtonAreas( OutputDevice* pDev, const Size& rOutSz, Rec vcl::Window *pBorder = pWin->GetWindow( WINDOW_BORDER ); // get the system's spin button size - ImplControlValue aControlValue; + EditBoxValue aControlValue(pWin->GetTextHeight()); Rectangle aBound; Point aPoint; @@ -721,7 +721,7 @@ void SpinField::Resize() { ImplCalcButtonAreas( this, aSize, maDropDownRect, maUpperRect, maLowerRect ); - ImplControlValue aControlValue; + EditBoxValue aControlValue(GetTextHeight()); Point aPoint; Rectangle aContent, aBound; @@ -920,7 +920,7 @@ Size SpinField::CalcMinimumSizeForText(const OUString &rString) const aSz.Width() += GetSettings().GetStyleSettings().GetScrollBarSize(); if ( GetStyle() & WB_SPIN ) { - ImplControlValue aControlValue; + EditBoxValue aControlValue(GetTextHeight()); Rectangle aArea( Point(), Size(100, aSz.Height())); Rectangle aEntireBound, aEntireContent, aEditBound, aEditContent; if ( diff --git a/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx b/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx index 666eaf6cb006..4406be246e87 100644 --- a/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx +++ b/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx @@ -1103,6 +1103,10 @@ bool GtkSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPar { aEditRect = AdjustRectForTextBordersPadding(mpComboboxStyle, rValue.getNumericVal(), rControlRegion); } + else if (CTRL_SPINBOX && nPart == PART_ENTIRE_CONTROL) + { + aEditRect = AdjustRectForTextBordersPadding(mpSpinStyle, rValue.getNumericVal(), rControlRegion); + } else { return false; |