Improve default size for wxGauge and wxChoice.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27292 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -560,7 +560,11 @@ wxSize wxChoice::DoGetBestSize() const
|
|||||||
if ( ret.x < 80 )
|
if ( ret.x < 80 )
|
||||||
ret.x = 80;
|
ret.x = 80;
|
||||||
|
|
||||||
ret.y = 16 + GetCharHeight();
|
// If this request_size is called with no entries then
|
||||||
|
// the returned height is wrong. Give it a reasonable
|
||||||
|
// default value.
|
||||||
|
if (ret.y <= 18)
|
||||||
|
ret.y = 8 + GetCharHeight();
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@@ -72,10 +72,10 @@ void wxGauge::DoSetGauge()
|
|||||||
|
|
||||||
wxSize wxGauge::DoGetBestSize() const
|
wxSize wxGauge::DoGetBestSize() const
|
||||||
{
|
{
|
||||||
if (HasFlag(wxGA_HORIZONTAL))
|
if (HasFlag(wxGA_VERTICAL))
|
||||||
return wxSize(100, 28);
|
|
||||||
else
|
|
||||||
return wxSize(28, 100);
|
return wxSize(28, 100);
|
||||||
|
else
|
||||||
|
return wxSize(100, 28);
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxGauge::SetRange( int range )
|
void wxGauge::SetRange( int range )
|
||||||
|
@@ -560,7 +560,11 @@ wxSize wxChoice::DoGetBestSize() const
|
|||||||
if ( ret.x < 80 )
|
if ( ret.x < 80 )
|
||||||
ret.x = 80;
|
ret.x = 80;
|
||||||
|
|
||||||
ret.y = 16 + GetCharHeight();
|
// If this request_size is called with no entries then
|
||||||
|
// the returned height is wrong. Give it a reasonable
|
||||||
|
// default value.
|
||||||
|
if (ret.y <= 18)
|
||||||
|
ret.y = 8 + GetCharHeight();
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@@ -72,10 +72,10 @@ void wxGauge::DoSetGauge()
|
|||||||
|
|
||||||
wxSize wxGauge::DoGetBestSize() const
|
wxSize wxGauge::DoGetBestSize() const
|
||||||
{
|
{
|
||||||
if (HasFlag(wxGA_HORIZONTAL))
|
if (HasFlag(wxGA_VERTICAL))
|
||||||
return wxSize(100, 28);
|
|
||||||
else
|
|
||||||
return wxSize(28, 100);
|
return wxSize(28, 100);
|
||||||
|
else
|
||||||
|
return wxSize(100, 28);
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxGauge::SetRange( int range )
|
void wxGauge::SetRange( int range )
|
||||||
|
Reference in New Issue
Block a user