Commit 3b4dbdd54ea225edffc2485bb4120dde4ac99d30
1 parent
ed1e7341
Exists in
mask_boolean_op_bkp
added the icons
Showing
5 changed files
with
10 additions
and
7 deletions
Show diff stats
884 Bytes
840 Bytes
820 Bytes
843 Bytes
invesalius/gui/dialogs.py
... | ... | @@ -23,6 +23,7 @@ import random |
23 | 23 | import sys |
24 | 24 | |
25 | 25 | import wx |
26 | +import wx.combo | |
26 | 27 | from wx.lib import masked |
27 | 28 | from wx.lib.agw import floatspin |
28 | 29 | from wx.lib.wordwrap import wordwrap |
... | ... | @@ -1495,14 +1496,16 @@ class MaskBooleanDialog(wx.Dialog): |
1495 | 1496 | else: |
1496 | 1497 | self.mask2.SetSelection(0) |
1497 | 1498 | |
1498 | - op_choices = ((u"Union", const.BOOLEAN_UNION), | |
1499 | - (u"Difference", const.BOOLEAN_DIFF), | |
1500 | - (u"Intersection", const.BOOLEAN_AND), | |
1501 | - (u"Exclusive disjunction", const.BOOLEAN_XOR)) | |
1502 | - self.op_boolean = wx.ComboBox(self, -1, op_choices[0][0], choices=[]) | |
1499 | + icon_folder = '../icons/' | |
1500 | + op_choices = ((_(u"Union"), const.BOOLEAN_UNION, 'bool_union.png'), | |
1501 | + (_(u"Difference"), const.BOOLEAN_DIFF, 'bool_difference.png'), | |
1502 | + (_(u"Intersection"), const.BOOLEAN_AND, 'bool_intersection.png'), | |
1503 | + (_(u"Exclusive disjunction"), const.BOOLEAN_XOR, 'bool_disjunction.png')) | |
1504 | + self.op_boolean = wx.combo.BitmapComboBox(self, -1, op_choices[0][0], choices=[]) | |
1503 | 1505 | |
1504 | - for n, i in op_choices: | |
1505 | - self.op_boolean.Append(n, i) | |
1506 | + for n, i, f in op_choices: | |
1507 | + bmp = wx.Bitmap(os.path.join(icon_folder, f), wx.BITMAP_TYPE_PNG) | |
1508 | + self.op_boolean.Append(n, bmp, i) | |
1506 | 1509 | |
1507 | 1510 | self.op_boolean.SetSelection(0) |
1508 | 1511 | ... | ... |