summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-04-27 13:39:55 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-04-27 17:12:07 +0100
commit653a4a659624d52945b9bd40647002cf31085fe0 (patch)
treee1bd4200709f733bc5b723dee205bad623d6e601 /vcl
parent15e88c27440b1bcebf5aa09ab36635e4e977a438 (diff)
gtk3: semi-sane height for spinboxes
Change-Id: I22fb833b59b7e2d749f8111d897f81899019e2d5
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/control/spinfld.cxx6
-rw-r--r--vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx4
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;