summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
authorIvo Hinkelmann <ihi@openoffice.org>2008-01-14 12:05:52 +0000
committerIvo Hinkelmann <ihi@openoffice.org>2008-01-14 12:05:52 +0000
commit3f30a8abe7e2ce04912d647aa1ba640d4fc02b77 (patch)
tree47873ecde5cd9e851f96ffffa3645ad204848a9d /vcl/source
parentfaaa915f424286484d9ee2d3d85a48654dc41264 (diff)
INTEGRATION: CWS awtfixes1 (1.24.46); FILE MERGED
2007/11/01 21:40:58 jcn 1.24.46.3: Issue number: i#80754# Submitted by: jcn Reviewed by: mmeeks Use correct width of spin button calculation. Fixes spinfield with larger font sizes. 2007/08/17 14:46:42 mmeeks 1.24.46.2: RESYNC: (1.24-1.25); FILE MERGED 2007/08/17 13:52:57 mmeeks 1.24.46.1: Issue number: i#80754# Submitted by: mmeeks Start of virtual method for sizing ...
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/control/spinfld.cxx18
1 files changed, 15 insertions, 3 deletions
diff --git a/vcl/source/control/spinfld.cxx b/vcl/source/control/spinfld.cxx
index 1808c57e9035..65c848ed652d 100644
--- a/vcl/source/control/spinfld.cxx
+++ b/vcl/source/control/spinfld.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: spinfld.cxx,v $
*
- * $Revision: 1.25 $
+ * $Revision: 1.26 $
*
- * last change: $Author: hr $ $Date: 2007-08-03 14:07:14 $
+ * last change: $Author: ihi $ $Date: 2008-01-14 13:05:52 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -974,13 +974,25 @@ Size SpinField::CalcMinimumSize() const
if ( GetStyle() & WB_DROPDOWN )
aSz.Width() += GetSettings().GetStyleSettings().GetScrollBarSize();
if ( GetStyle() & WB_SPIN )
- aSz.Width() += GetSettings().GetStyleSettings().GetSpinSize();
+ aSz.Width() += maUpperRect.GetWidth();
return aSz;
}
// -----------------------------------------------------------------------
+Size SpinField::GetOptimalSize(WindowSizeType eType) const
+{
+ switch (eType) {
+ case WINDOWSIZE_MINIMUM:
+ return CalcMinimumSize();
+ default:
+ return Edit::GetOptimalSize( eType );
+ }
+}
+
+// -----------------------------------------------------------------------
+
Size SpinField::CalcSize( USHORT nChars ) const
{
Size aSz = Edit::CalcSize( nChars );