git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33484
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
// TBS_HORZ, TBS_RIGHT and TBS_BOTTOM are 0 but do include them for clarity
msStyle |= style & wxSL_VERTICAL ? TBS_VERT : TBS_HORZ;
// TBS_HORZ, TBS_RIGHT and TBS_BOTTOM are 0 but do include them for clarity
msStyle |= style & wxSL_VERTICAL ? TBS_VERT : TBS_HORZ;
- if ( style & wxSL_LEFT )
- msStyle |= TBS_LEFT;
- else if ( style & wxSL_RIGHT )
- msStyle |= TBS_RIGHT;
- else if ( style & wxSL_TOP )
- msStyle |= TBS_TOP;
- else if ( style & wxSL_BOTTOM )
- msStyle |= TBS_BOTTOM;
-
+ {
+ // this fully specifies the style combined with TBS_VERT/HORZ above
+ }
+ else // choose one direction
+ {
+ if ( style & wxSL_LEFT )
+ msStyle |= TBS_LEFT;
+ else if ( style & wxSL_RIGHT )
+ msStyle |= TBS_RIGHT;
+ else if ( style & wxSL_TOP )
+ msStyle |= TBS_TOP;
+ else if ( style & wxSL_BOTTOM )
+ msStyle |= TBS_BOTTOM;
+ }
if ( style & wxSL_AUTOTICKS )
msStyle |= TBS_AUTOTICKS;
if ( style & wxSL_AUTOTICKS )
msStyle |= TBS_AUTOTICKS;
{
// these values are arbitrary
static const int length = 100;
{
// these values are arbitrary
static const int length = 100;
- static const int thickness = 26;
+ static const int thumb = 24;
+ static const int ticks = 8;
wxSize size;
if ( HasFlag(wxSL_VERTICAL) )
{
wxSize size;
if ( HasFlag(wxSL_VERTICAL) )
{
else // horizontal
{
size.x = length;
else // horizontal
{
size.x = length;
+ size.y = thumb;
+ width = &size.y;
+ // need extra space to show ticks
+ if ( HasFlag(wxSL_TICKS) )
+ {
+ *width += ticks;
+
+ // and maybe twice as much if we show them on both sides
+ if ( HasFlag(wxSL_BOTH) )
+ *width += ticks;
+ }
+