[Commits] (davids) colheader - fixed a height sizing bug
commits at osafoundation.org
commits at osafoundation.org
Sun Apr 3 22:22:38 PDT 2005
Commit by: davids
Modified files:
internal/wxPython-2.5/src/generic/colheader.cpp 1.44 1.45
Log message:
colheader - fixed a height sizing bug
r=TBD
ViewCVS links:
http://cvs.osafoundation.org/index.cgi/internal/wxPython-2.5/src/generic/colheader.cpp.diff?r1=text&tr1=1.44&r2=text&tr2=1.45
Index: internal/wxPython-2.5/src/generic/colheader.cpp
diff -u internal/wxPython-2.5/src/generic/colheader.cpp:1.44 internal/wxPython-2.5/src/generic/colheader.cpp:1.45
--- internal/wxPython-2.5/src/generic/colheader.cpp:1.44 Sun Apr 3 17:44:52 2005
+++ internal/wxPython-2.5/src/generic/colheader.cpp Sun Apr 3 22:22:37 2005
@@ -274,22 +274,10 @@
#endif
}
- // FIXME: sloppy hack
+ // NB: is this advisable?
wxControl::DoGetPosition( &(m_NativeBoundsR.x), &(m_NativeBoundsR.y) );
wxControl::DoGetSize( &(m_NativeBoundsR.width), &(m_NativeBoundsR.height) );
-#if 0
- // for debugging
- if (m_NativeBoundsR.x < 0)
- m_NativeBoundsR.x = 0;
- if (m_NativeBoundsR.y < 0)
- m_NativeBoundsR.y = 0;
- if (m_NativeBoundsR.width)
- m_NativeBoundsR.width = 200;
- if (m_NativeBoundsR.height)
- m_NativeBoundsR.height = 17;
-#endif
-
return bResultV;
}
@@ -369,7 +357,7 @@
wxControl::DoMoveWindow( x, y + yDiff, width, height - yDiff );
- // FIXME: sloppy hack
+ // NB: is this advisable?
wxControl::DoGetPosition( &(m_NativeBoundsR.x), &(m_NativeBoundsR.y) );
}
@@ -445,14 +433,20 @@
int height,
int sizeFlags )
{
+wxSize actualSize;
+
// FIXME: should be - invalidate( origBoundsR )
+ // NB: correct height for native platform limitations
+ actualSize = CalculateDefaultSize();
+ height = actualSize.y;
+
wxControl::DoSetSize( x, y, width, height, sizeFlags );
if (m_BProportionalResizing)
RescaleToFit( width );
- // FIXME: sloppy hack
+ // NB: is this advisable?
wxControl::DoGetPosition( &(m_NativeBoundsR.x), &(m_NativeBoundsR.y) );
wxControl::DoGetSize( &(m_NativeBoundsR.width), &(m_NativeBoundsR.height) );
More information about the Commits
mailing list