Commit a034dd5816cdd448759782ed9b521ab96a3ed85f
1 parent
26bf2001
Exists in
master
and in
68 other branches
FIX: Translate Icon under Linux and Windows
Showing
1 changed file
with
35 additions
and
18 deletions
Show diff stats
invesalius/gui/frame.py
... | ... | @@ -300,20 +300,31 @@ class ProjectToolBar(wx.ToolBar): |
300 | 300 | |
301 | 301 | |
302 | 302 | if sys.platform == 'darwin': |
303 | - BMP_IMPORT = wx.Bitmap("../icons/file_import_original.png", wx.BITMAP_TYPE_PNG) | |
304 | - BMP_NET = wx.Bitmap("../icons/file_from_internet_original.png", wx.BITMAP_TYPE_PNG) | |
305 | - BMP_SAVE = wx.Bitmap("../icons/file_save_original.png", wx.BITMAP_TYPE_PNG) | |
306 | - BMP_PRINT = wx.Bitmap("../icons/print_original.png", wx.BITMAP_TYPE_PNG) | |
307 | - BMP_PHOTO = wx.Bitmap("../icons/tool_photo_original.png", wx.BITMAP_TYPE_PNG) | |
303 | + BMP_IMPORT = wx.Bitmap("../icons/file_import_original.png", | |
304 | + wx.BITMAP_TYPE_PNG) | |
305 | + BMP_NET = wx.Bitmap("../icons/file_from_internet_original.png", | |
306 | + wx.BITMAP_TYPE_PNG) | |
307 | + BMP_SAVE = wx.Bitmap("../icons/file_save_original.png", | |
308 | + wx.BITMAP_TYPE_PNG) | |
309 | + BMP_PRINT = wx.Bitmap("../icons/print_original.png", | |
310 | + wx.BITMAP_TYPE_PNG) | |
311 | + BMP_PHOTO = wx.Bitmap("../icons/tool_photo_original.png", | |
312 | + wx.BITMAP_TYPE_PNG) | |
308 | 313 | else: |
309 | - BMP_IMPORT = wx.Bitmap("../icons/file_import.png", wx.BITMAP_TYPE_PNG) | |
310 | - BMP_NET = wx.Bitmap("../icons/file_from_internet.png", wx.BITMAP_TYPE_PNG) | |
311 | - BMP_SAVE = wx.Bitmap("../icons/file_save.png", wx.BITMAP_TYPE_PNG) | |
312 | - BMP_PRINT = wx.Bitmap("../icons/print.png", wx.BITMAP_TYPE_PNG) | |
313 | - BMP_PHOTO = wx.Bitmap("../icons/tool_photo.png", wx.BITMAP_TYPE_PNG) | |
314 | + BMP_IMPORT = wx.Bitmap("../icons/file_import.png", | |
315 | + wx.BITMAP_TYPE_PNG) | |
316 | + BMP_NET = wx.Bitmap("../icons/file_from_internet.png", | |
317 | + wx.BITMAP_TYPE_PNG) | |
318 | + BMP_SAVE = wx.Bitmap("../icons/file_save.png", | |
319 | + wx.BITMAP_TYPE_PNG) | |
320 | + BMP_PRINT = wx.Bitmap("../icons/print.png", | |
321 | + wx.BITMAP_TYPE_PNG) | |
322 | + BMP_PHOTO = wx.Bitmap("../icons/tool_photo.png", | |
323 | + wx.BITMAP_TYPE_PNG) | |
314 | 324 | |
315 | 325 | self.AddLabelTool(ID_FILE_IMPORT, "Import medical image...", BMP_IMPORT) |
316 | - self.AddLabelTool(ID_FILE_LOAD_INTERNET, "Load medical image...", BMP_NET) | |
326 | + self.AddLabelTool(ID_FILE_LOAD_INTERNET, "Load medical image...", | |
327 | + BMP_NET) | |
317 | 328 | self.AddLabelTool(ID_FILE_SAVE, "Save InVesalius project", BMP_SAVE) |
318 | 329 | self.AddLabelTool(101, "Take photo of screen", BMP_PHOTO) |
319 | 330 | self.AddLabelTool(ID_FILE_PRINT, "Print medical image...", BMP_PRINT) |
... | ... | @@ -327,7 +338,8 @@ class ProjectToolBar(wx.ToolBar): |
327 | 338 | class ObjectToolBar(wx.ToolBar): |
328 | 339 | # TODO: what will appear in menubar? |
329 | 340 | def __init__(self, parent): |
330 | - wx.ToolBar.__init__(self, parent, -1, wx.DefaultPosition, wx.DefaultSize, wx.TB_FLAT|wx.TB_NODIVIDER) | |
341 | + wx.ToolBar.__init__(self, parent, -1, wx.DefaultPosition, wx.DefaultSize, | |
342 | + wx.TB_FLAT|wx.TB_NODIVIDER) | |
331 | 343 | if sys.platform == 'darwin': |
332 | 344 | self.SetToolBitmapSize(wx.Size(32,32)) |
333 | 345 | |
... | ... | @@ -339,14 +351,19 @@ class ObjectToolBar(wx.ToolBar): |
339 | 351 | |
340 | 352 | |
341 | 353 | if sys.platform == 'darwin': |
342 | - BMP_ROTATE = wx.Bitmap("../icons/tool_rotate_original.gif", wx.BITMAP_TYPE_GIF) | |
343 | - BMP_TRANSLATE = wx.Bitmap("../icons/tool_translate_original.png", wx.BITMAP_TYPE_PNG) | |
344 | - BMP_ZOOM_IN = wx.Bitmap("../icons/tool_zoom_in_original.png", wx.BITMAP_TYPE_PNG) | |
345 | - BMP_ZOOM_OUT = wx.Bitmap("../icons/tool_zoom_out_original.png", wx.BITMAP_TYPE_PNG) | |
346 | - BMP_CONTRAST = wx.Bitmap("../icons/tool_contrast.png", wx.BITMAP_TYPE_PNG) | |
354 | + BMP_ROTATE = wx.Bitmap("../icons/tool_rotate_original.gif", | |
355 | + wx.BITMAP_TYPE_GIF) | |
356 | + BMP_TRANSLATE = wx.Bitmap("../icons/tool_translate_original.png", | |
357 | + wx.BITMAP_TYPE_PNG) | |
358 | + BMP_ZOOM_IN = wx.Bitmap("../icons/tool_zoom_in_original.png", | |
359 | + wx.BITMAP_TYPE_PNG) | |
360 | + BMP_ZOOM_OUT = wx.Bitmap("../icons/tool_zoom_out_original.png", | |
361 | + wx.BITMAP_TYPE_PNG) | |
362 | + BMP_CONTRAST = wx.Bitmap("../icons/tool_contrast.png", | |
363 | + wx.BITMAP_TYPE_PNG) | |
347 | 364 | else: |
348 | 365 | BMP_ROTATE = wx.Bitmap("../icons/tool_rotate.gif", wx.BITMAP_TYPE_GIF) |
349 | - BMP_TRANSLATE = wx.Bitmap("../icons/tool_translate.png", wx.BITMAP_TYPE_PNG) | |
366 | + BMP_TRANSLATE = wx.Bitmap("../icons/tool_translate.gif", wx.BITMAP_TYPE_GIF) | |
350 | 367 | BMP_ZOOM_IN = wx.Bitmap("../icons/tool_zoom_in.png", wx.BITMAP_TYPE_PNG) |
351 | 368 | BMP_ZOOM_OUT = wx.Bitmap("../icons/tool_zoom_out.png", wx.BITMAP_TYPE_PNG) |
352 | 369 | BMP_CONTRAST = wx.Bitmap("../icons/tool_contrast.png", wx.BITMAP_TYPE_PNG) | ... | ... |