Commit 532e9e80d7e6426f116738bf6dd21ea999ff8f33
1 parent
a3bd2801
Exists in
wx2.9_mac
undo and redo icons
Showing
1 changed file
with
12 additions
and
12 deletions
Show diff stats
invesalius/gui/frame.py
... | ... | @@ -75,6 +75,9 @@ ARTID_FNAME = {'tool_rotate': os.path.join(d, "tool_rotate_original.png"), |
75 | 75 | 'layout_full': os.path.join(d, "layout_full_original.png"), |
76 | 76 | 'text_inverted': os.path.join(d, "text_inverted_original.png"), |
77 | 77 | 'text': os.path.join(d, "text_original.png"), |
78 | + | |
79 | + 'undo': os.path.join(d, "undo_original.png"), | |
80 | + 'redo': os.path.join(d, "redo_original.png"), | |
78 | 81 | } |
79 | 82 | |
80 | 83 | |
... | ... | @@ -1504,21 +1507,18 @@ class HistoryToolBar(wx.ToolBar): |
1504 | 1507 | Add tools into toolbar. |
1505 | 1508 | """ |
1506 | 1509 | d = const.ICON_DIR |
1507 | - if sys.platform == 'darwin' and wx.VERSION < (2, 9): | |
1508 | - # Bitmaps for show/hide task panel item | |
1509 | - p = os.path.join(d, "undo_original.png") | |
1510 | - self.BMP_UNDO = wx.Bitmap(p, wx.BITMAP_TYPE_PNG) | |
1511 | - | |
1512 | - p = os.path.join(d, "redo_original.png") | |
1513 | - self.BMP_REDO = wx.Bitmap(p, wx.BITMAP_TYPE_PNG) | |
1510 | + client = "wx.ART_TOOLBAR" | |
1511 | + wx.ArtProvider.Push(MyArtProvider()) | |
1514 | 1512 | |
1513 | + if sys.platform == 'darwin' and wx.VERSION < (2, 9): | |
1514 | + size = 48, 48 | |
1515 | 1515 | else: |
1516 | - # Bitmaps for show/hide task panel item | |
1517 | - p = os.path.join(d, "undo_small.png") | |
1518 | - self.BMP_UNDO = wx.Bitmap(p, wx.BITMAP_TYPE_PNG) | |
1516 | + size = 32, 32 | |
1519 | 1517 | |
1520 | - p = os.path.join(d, "redo_small.png") | |
1521 | - self.BMP_REDO = wx.Bitmap(p, wx.BITMAP_TYPE_PNG) | |
1518 | + self.BMP_UNDO = wx.ArtProvider.GetBitmap('undo', client, size) | |
1519 | + self.BMP_REDO = wx.ArtProvider.GetBitmap('redo', client, size) | |
1520 | + | |
1521 | + wx.ArtProvider.Pop() | |
1522 | 1522 | |
1523 | 1523 | self.AddLabelTool(wx.ID_UNDO, |
1524 | 1524 | "", | ... | ... |