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:
Vadim Zeitlin
2019-02-23 19:03:51 +01:00
parent 44eb96b993
commit 4a02b73a6a

View File

@@ -94,6 +94,9 @@
#define TB_GETMAXSIZE (WM_USER + 83)
#endif
// Margin between the control and its label.
static const int MARGIN_CONTROL_LABEL = 3;
// ----------------------------------------------------------------------------
// wxWin macros
// ----------------------------------------------------------------------------
@@ -1227,7 +1230,7 @@ bool wxToolBar::Realize()
if ( staticText && staticText->IsShown() )
{
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