mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-08 04:50:07 +01:00
Merge pull request #1268 from tycode/dropdown-button-text-not-rendering
Fix AUI dropdown button not rendering text when icon is wx.NullBitmap
This commit is contained in:
@@ -1169,7 +1169,7 @@ class AuiFrame(wx.Frame):
|
||||
agwStyle=aui.AUI_TB_OVERFLOW | aui.AUI_TB_TEXT | aui.AUI_TB_HORZ_TEXT)
|
||||
tb4.SetToolBitmapSize(wx.Size(16, 16))
|
||||
tb4_bmp1 = wx.ArtProvider.GetBitmap(wx.ART_NORMAL_FILE, wx.ART_OTHER, wx.Size(16, 16))
|
||||
tb4.AddSimpleTool(ID_DropDownToolbarItem, "Item 1", tb4_bmp1)
|
||||
tb4.AddSimpleTool(ID_DropDownToolbarItem, "Item 1", wx.NullBitmap)
|
||||
tb4.AddSimpleTool(ID_SampleItem+23, "Item 2", tb4_bmp1)
|
||||
tb4.AddSimpleTool(ID_SampleItem+24, "Item 3", tb4_bmp1)
|
||||
tb4.AddSimpleTool(ID_SampleItem+25, "Item 4", tb4_bmp1)
|
||||
|
||||
@@ -1123,10 +1123,8 @@ class AuiDefaultToolBarArt(object):
|
||||
bmp = item.GetBitmap()
|
||||
dropbmp = self._button_dropdown_bmp
|
||||
|
||||
if not bmp.IsOk():
|
||||
return
|
||||
|
||||
dc.DrawBitmap(bmp, bmp_rect.x, bmp_rect.y, True)
|
||||
if bmp.IsOk():
|
||||
dc.DrawBitmap(bmp, bmp_rect.x, bmp_rect.y, True)
|
||||
if horizontal:
|
||||
dc.DrawBitmap(dropbmp, dropbmp_x, dropbmp_y, True)
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user