Commit 3ce4fd00a779f6856fa6a88b691c576a43ec7e85
1 parent
56a97e23
Exists in
master
and in
68 other branches
ENC: Icons on toolbar and task export
Showing
2 changed files
with
38 additions
and
33 deletions
Show diff stats
invesalius/gui/frame.py
| @@ -412,7 +412,7 @@ class ObjectToolBar(wx.ToolBar): | @@ -412,7 +412,7 @@ class ObjectToolBar(wx.ToolBar): | ||
| 412 | wx.BITMAP_TYPE_PNG) | 412 | wx.BITMAP_TYPE_PNG) |
| 413 | BMP_ZOOM_SELECT = wx.Bitmap("../icons/tool_zoom_select_original.png", | 413 | BMP_ZOOM_SELECT = wx.Bitmap("../icons/tool_zoom_select_original.png", |
| 414 | wx.BITMAP_TYPE_PNG) | 414 | wx.BITMAP_TYPE_PNG) |
| 415 | - BMP_CONTRAST = wx.Bitmap("../icons/tool_contrast.png", | 415 | + BMP_CONTRAST = wx.Bitmap("../icons/tool_contrast_original.png", |
| 416 | wx.BITMAP_TYPE_PNG) | 416 | wx.BITMAP_TYPE_PNG) |
| 417 | else: | 417 | else: |
| 418 | 418 |
invesalius/gui/task_exporter.py
| @@ -109,29 +109,32 @@ class InnerTaskPanel(wx.Panel): | @@ -109,29 +109,32 @@ class InnerTaskPanel(wx.Panel): | ||
| 109 | link_export_surface.Bind(hl.EVT_HYPERLINK_LEFT, | 109 | link_export_surface.Bind(hl.EVT_HYPERLINK_LEFT, |
| 110 | self.OnLinkExportSurface) | 110 | self.OnLinkExportSurface) |
| 111 | 111 | ||
| 112 | - tooltip = wx.ToolTip("Request rapid prototyping services") | ||
| 113 | - link_request_rp = hl.HyperLinkCtrl(self,-1,"Request rapid prototyping...") | ||
| 114 | - link_request_rp.SetUnderlines(False, False, False) | ||
| 115 | - link_request_rp.SetColours("BLACK", "BLACK", "BLACK") | ||
| 116 | - link_request_rp.SetToolTip(tooltip) | ||
| 117 | - link_request_rp.AutoBrowse(False) | ||
| 118 | - link_request_rp.UpdateLink() | ||
| 119 | - link_request_rp.Bind(hl.EVT_HYPERLINK_LEFT, self.OnLinkRequestRP) | ||
| 120 | - | ||
| 121 | - tooltip = wx.ToolTip("Open report tool...") | ||
| 122 | - link_report = hl.HyperLinkCtrl(self,-1,"Open report tool...") | ||
| 123 | - link_report.SetUnderlines(False, False, False) | ||
| 124 | - link_report.SetColours("BLACK", "BLACK", "BLACK") | ||
| 125 | - link_report.SetToolTip(tooltip) | ||
| 126 | - link_report.AutoBrowse(False) | ||
| 127 | - link_report.UpdateLink() | ||
| 128 | - link_report.Bind(hl.EVT_HYPERLINK_LEFT, self.OnLinkReport) | 112 | + #tooltip = wx.ToolTip("Request rapid prototyping services") |
| 113 | + #link_request_rp = hl.HyperLinkCtrl(self,-1,"Request rapid prototyping...") | ||
| 114 | + #link_request_rp.SetUnderlines(False, False, False) | ||
| 115 | + #link_request_rp.SetColours("BLACK", "BLACK", "BLACK") | ||
| 116 | + #link_request_rp.SetToolTip(tooltip) | ||
| 117 | + #link_request_rp.AutoBrowse(False) | ||
| 118 | + #link_request_rp.UpdateLink() | ||
| 119 | + #link_request_rp.Bind(hl.EVT_HYPERLINK_LEFT, self.OnLinkRequestRP) | ||
| 120 | + | ||
| 121 | + #tooltip = wx.ToolTip("Open report tool...") | ||
| 122 | + #link_report = hl.HyperLinkCtrl(self,-1,"Open report tool...") | ||
| 123 | + #link_report.SetUnderlines(False, False, False) | ||
| 124 | + #link_report.SetColours("BLACK", "BLACK", "BLACK") | ||
| 125 | + #link_report.SetToolTip(tooltip) | ||
| 126 | + #link_report.AutoBrowse(False) | ||
| 127 | + #link_report.UpdateLink() | ||
| 128 | + #link_report.Bind(hl.EVT_HYPERLINK_LEFT, self.OnLinkReport) | ||
| 129 | 129 | ||
| 130 | 130 | ||
| 131 | # Image(s) for buttons | 131 | # Image(s) for buttons |
| 132 | - BMP_IMPORT = wx.Bitmap("../icons/file_import.png", wx.BITMAP_TYPE_PNG) | 132 | + BMP_EXPORT_SURFACE = wx.Bitmap("../icons/surface_export.png", |
| 133 | + wx.BITMAP_TYPE_PNG) | ||
| 134 | + BMP_TAKE_PICTURE = wx.Bitmap("../icons/tool_photo_original.png", | ||
| 135 | + wx.BITMAP_TYPE_PNG) | ||
| 133 | 136 | ||
| 134 | - bmp_list = [BMP_IMPORT] | 137 | + bmp_list = [BMP_TAKE_PICTURE, BMP_EXPORT_SURFACE] |
| 135 | for bmp in bmp_list: | 138 | for bmp in bmp_list: |
| 136 | bmp.SetWidth(25) | 139 | bmp.SetWidth(25) |
| 137 | bmp.SetHeight(25) | 140 | bmp.SetHeight(25) |
| @@ -140,14 +143,16 @@ class InnerTaskPanel(wx.Panel): | @@ -140,14 +143,16 @@ class InnerTaskPanel(wx.Panel): | ||
| 140 | button_style = pbtn.PB_STYLE_SQUARE | pbtn.PB_STYLE_DEFAULT | 143 | button_style = pbtn.PB_STYLE_SQUARE | pbtn.PB_STYLE_DEFAULT |
| 141 | 144 | ||
| 142 | button_picture = pbtn.PlateButton(self, BTN_PICTURE, "", | 145 | button_picture = pbtn.PlateButton(self, BTN_PICTURE, "", |
| 143 | - BMP_IMPORT, style=button_style) | ||
| 144 | - button_surface = pbtn.PlateButton(self, BTN_SURFACE, "", BMP_IMPORT, | 146 | + BMP_TAKE_PICTURE, |
| 147 | + style=button_style) | ||
| 148 | + button_surface = pbtn.PlateButton(self, BTN_SURFACE, "", | ||
| 149 | + BMP_EXPORT_SURFACE, | ||
| 145 | style=button_style) | 150 | style=button_style) |
| 146 | - button_request_rp = pbtn.PlateButton(self, BTN_REQUEST_RP, "", | ||
| 147 | - BMP_IMPORT, style=button_style) | ||
| 148 | - button_report = pbtn.PlateButton(self, BTN_REPORT, "", | ||
| 149 | - BMP_IMPORT, | ||
| 150 | - style=button_style) | 151 | + #button_request_rp = pbtn.PlateButton(self, BTN_REQUEST_RP, "", |
| 152 | + # BMP_IMPORT, style=button_style) | ||
| 153 | + #button_report = pbtn.PlateButton(self, BTN_REPORT, "", | ||
| 154 | + # BMP_IMPORT, | ||
| 155 | + # style=button_style) | ||
| 151 | 156 | ||
| 152 | # When using PlaneButton, it is necessary to bind events from parent win | 157 | # When using PlaneButton, it is necessary to bind events from parent win |
| 153 | self.Bind(wx.EVT_BUTTON, self.OnButton) | 158 | self.Bind(wx.EVT_BUTTON, self.OnButton) |
| @@ -156,16 +161,16 @@ class InnerTaskPanel(wx.Panel): | @@ -156,16 +161,16 @@ class InnerTaskPanel(wx.Panel): | ||
| 156 | flag_link = wx.EXPAND|wx.GROW|wx.LEFT|wx.TOP | 161 | flag_link = wx.EXPAND|wx.GROW|wx.LEFT|wx.TOP |
| 157 | flag_button = wx.EXPAND | wx.GROW | 162 | flag_button = wx.EXPAND | wx.GROW |
| 158 | 163 | ||
| 159 | - fixed_sizer = wx.FlexGridSizer(rows=4, cols=2, hgap=2, vgap=0) | 164 | + fixed_sizer = wx.FlexGridSizer(rows=2, cols=2, hgap=2, vgap=0) |
| 160 | fixed_sizer.AddGrowableCol(0, 1) | 165 | fixed_sizer.AddGrowableCol(0, 1) |
| 161 | fixed_sizer.AddMany([ (link_export_picture, 1, flag_link, 3), | 166 | fixed_sizer.AddMany([ (link_export_picture, 1, flag_link, 3), |
| 162 | (button_picture, 0, flag_button), | 167 | (button_picture, 0, flag_button), |
| 163 | (link_export_surface, 1, flag_link, 3), | 168 | (link_export_surface, 1, flag_link, 3), |
| 164 | - (button_surface, 0, flag_button), | ||
| 165 | - (link_report, 0, flag_link, 3), | ||
| 166 | - (button_report, 0, flag_button), | ||
| 167 | - (link_request_rp, 1, flag_link, 3), | ||
| 168 | - (button_request_rp, 0, flag_button)]) | 169 | + (button_surface, 0, flag_button)])#, |
| 170 | + #(link_report, 0, flag_link, 3), | ||
| 171 | + #(button_report, 0, flag_button), | ||
| 172 | + #(link_request_rp, 1, flag_link, 3), | ||
| 173 | + #(button_request_rp, 0, flag_button)]) | ||
| 169 | 174 | ||
| 170 | # Add line sizers into main sizer | 175 | # Add line sizers into main sizer |
| 171 | main_sizer = wx.BoxSizer(wx.VERTICAL) | 176 | main_sizer = wx.BoxSizer(wx.VERTICAL) |