Use a symbolic constant instead of hardcoded 3
No real changes, just give a name to the constant used for the number of pixels to leave between an embedded control and its label.
This commit is contained in:
@@ -94,6 +94,9 @@
|
|||||||
#define TB_GETMAXSIZE (WM_USER + 83)
|
#define TB_GETMAXSIZE (WM_USER + 83)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Margin between the control and its label.
|
||||||
|
static const int MARGIN_CONTROL_LABEL = 3;
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// wxWin macros
|
// wxWin macros
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -1227,7 +1230,7 @@ bool wxToolBar::Realize()
|
|||||||
if ( staticText && staticText->IsShown() )
|
if ( staticText && staticText->IsShown() )
|
||||||
{
|
{
|
||||||
staticTextSize = staticText->GetSize();
|
staticTextSize = staticText->GetSize();
|
||||||
staticTextSize.y += 3; // margin between control and its label
|
staticTextSize.y += MARGIN_CONTROL_LABEL;
|
||||||
}
|
}
|
||||||
|
|
||||||
// position the control itself correctly vertically centering it on the
|
// position the control itself correctly vertically centering it on the
|
||||||
|
Reference in New Issue
Block a user