Commit ab56d6b967ace5f8180afb15241c6935a8bd0f27
1 parent
5d6aefdb
Exists in
master
and in
6 other branches
FIX: Button related to save preset under darwin (cairo)
Showing
1 changed file
with
10 additions
and
7 deletions
Show diff stats
invesalius/gui/widgets/clut_raycasting.py
... | ... | @@ -626,8 +626,8 @@ class CLUTRaycastingWidget(wx.Panel): |
626 | 626 | self._draw_curves(ctx) |
627 | 627 | self._draw_points(ctx) |
628 | 628 | self._draw_selection_curve(ctx, height) |
629 | - self._draw_tool_bar(ctx, height) | |
630 | 629 | if sys.platform != "darwin": |
630 | + self._draw_tool_bar(ctx, height) | |
631 | 631 | if self.point_dragged: |
632 | 632 | self._draw_selected_point_text(ctx) |
633 | 633 | |
... | ... | @@ -652,12 +652,15 @@ class CLUTRaycastingWidget(wx.Panel): |
652 | 652 | self.Histogram.points.append((x, y)) |
653 | 653 | |
654 | 654 | def _build_buttons(self): |
655 | - img = cairo.ImageSurface.create_from_png(os.path.join(const.ICON_DIR, 'Floppy.png')) | |
656 | - width = img.get_width() | |
657 | - height = img.get_height() | |
658 | - self.save_button = Button() | |
659 | - self.save_button.image = img | |
660 | - self.save_button.size = (width, height) | |
655 | + if sys.platform == 'darwin': | |
656 | + self.save_button = Button() | |
657 | + else: | |
658 | + img = cairo.ImageSurface.create_from_png(os.path.join(const.ICON_DIR, 'Floppy.png')) | |
659 | + width = img.get_width() | |
660 | + height = img.get_height() | |
661 | + self.save_button = Button() | |
662 | + self.save_button.image = img | |
663 | + self.save_button.size = (width, height) | |
661 | 664 | |
662 | 665 | def __sort_pixel_points(self): |
663 | 666 | """ | ... | ... |