setting the image position after the label is set, otherwise image_only will have the potential label over the image
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68997 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1375,14 +1375,6 @@ bool wxToolBar::DoInsertTool(size_t WXUNUSED(pos), wxToolBarToolBase *toolBase)
|
|||||||
[v setButtonType: ( tool->CanBeToggled() ? NSToggleButton : NSMomentaryPushInButton )];
|
[v setButtonType: ( tool->CanBeToggled() ? NSToggleButton : NSMomentaryPushInButton )];
|
||||||
[v setImplementation:tool];
|
[v setImplementation:tool];
|
||||||
|
|
||||||
if ( style & wxTB_NOICONS )
|
|
||||||
[v setImagePosition:NSNoImage];
|
|
||||||
else if ( style & wxTB_TEXT )
|
|
||||||
[v setImagePosition:NSImageAbove];
|
|
||||||
else
|
|
||||||
[v setImagePosition:NSImageOnly];
|
|
||||||
|
|
||||||
|
|
||||||
controlHandle = v;
|
controlHandle = v;
|
||||||
|
|
||||||
#if wxOSX_USE_NATIVE_TOOLBAR
|
#if wxOSX_USE_NATIVE_TOOLBAR
|
||||||
@@ -1399,6 +1391,13 @@ bool wxToolBar::DoInsertTool(size_t WXUNUSED(pos), wxToolBarToolBase *toolBase)
|
|||||||
tool->SetControlHandle( controlHandle );
|
tool->SetControlHandle( controlHandle );
|
||||||
tool->UpdateImages();
|
tool->UpdateImages();
|
||||||
tool->UpdateLabel();
|
tool->UpdateLabel();
|
||||||
|
|
||||||
|
if ( style & wxTB_NOICONS )
|
||||||
|
[v setImagePosition:NSNoImage];
|
||||||
|
else if ( style & wxTB_TEXT )
|
||||||
|
[v setImagePosition:NSImageAbove];
|
||||||
|
else
|
||||||
|
[v setImagePosition:NSImageOnly];
|
||||||
[v sizeToFit];
|
[v sizeToFit];
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
|
Reference in New Issue
Block a user