Commit 3a3d1ea61ddcad16b359516ef1f1e90a669108e0
1 parent
6f8a7155
Exists in
wxgtk3_bkp
Fixed the problems with backgroundcolour from statictext in the taskbar
Showing
4 changed files
with
35 additions
and
16 deletions
Show diff stats
invesalius/gui/task_exporter.py
| ... | ... | @@ -99,7 +99,8 @@ class InnerTaskPanel(wx.Panel): |
| 99 | 99 | |
| 100 | 100 | def __init__(self, parent): |
| 101 | 101 | wx.Panel.__init__(self, parent) |
| 102 | - self.SetBackgroundColour(wx.Colour(255,255,255)) | |
| 102 | + backgroud_colour = wx.Colour(255,255,255) | |
| 103 | + self.SetBackgroundColour(backgroud_colour) | |
| 103 | 104 | self.SetAutoLayout(1) |
| 104 | 105 | |
| 105 | 106 | # Counter for projects loaded in current GUI |
| ... | ... | @@ -109,7 +110,9 @@ class InnerTaskPanel(wx.Panel): |
| 109 | 110 | link_export_picture = hl.HyperLinkCtrl(self, -1, |
| 110 | 111 | _("Export picture...")) |
| 111 | 112 | link_export_picture.SetUnderlines(False, False, False) |
| 113 | + link_export_picture.SetBold(True) | |
| 112 | 114 | link_export_picture.SetColours("BLACK", "BLACK", "BLACK") |
| 115 | + link_export_picture.SetBackgroundColour(self.GetBackgroundColour()) | |
| 113 | 116 | link_export_picture.SetToolTip(tooltip) |
| 114 | 117 | link_export_picture.AutoBrowse(False) |
| 115 | 118 | link_export_picture.UpdateLink() |
| ... | ... | @@ -119,7 +122,9 @@ class InnerTaskPanel(wx.Panel): |
| 119 | 122 | tooltip = wx.ToolTip(_("Export 3D surface")) |
| 120 | 123 | link_export_surface = hl.HyperLinkCtrl(self, -1,_("Export 3D surface...")) |
| 121 | 124 | link_export_surface.SetUnderlines(False, False, False) |
| 125 | + link_export_surface.SetBold(True) | |
| 122 | 126 | link_export_surface.SetColours("BLACK", "BLACK", "BLACK") |
| 127 | + link_export_surface.SetBackgroundColour(self.GetBackgroundColour()) | |
| 123 | 128 | link_export_surface.SetToolTip(tooltip) |
| 124 | 129 | link_export_surface.AutoBrowse(False) |
| 125 | 130 | link_export_surface.UpdateLink() |
| ... | ... | @@ -189,11 +194,13 @@ class InnerTaskPanel(wx.Panel): |
| 189 | 194 | button_picture = pbtn.PlateButton(self, BTN_PICTURE, "", |
| 190 | 195 | BMP_TAKE_PICTURE, |
| 191 | 196 | style=button_style) |
| 197 | + button_picture.SetBackgroundColour(self.GetBackgroundColour()) | |
| 192 | 198 | self.button_picture = button_picture |
| 193 | 199 | |
| 194 | 200 | button_surface = pbtn.PlateButton(self, BTN_SURFACE, "", |
| 195 | 201 | BMP_EXPORT_SURFACE, |
| 196 | 202 | style=button_style) |
| 203 | + button_surface.SetBackgroundColour(self.GetBackgroundColour()) | |
| 197 | 204 | #button_mask = pbtn.PlateButton(self, BTN_MASK, "", |
| 198 | 205 | # BMP_EXPORT_MASK, |
| 199 | 206 | # style=button_style) | ... | ... |
invesalius/gui/task_importer.py
| ... | ... | @@ -51,7 +51,10 @@ class TaskPanel(wx.Panel): |
| 51 | 51 | class InnerTaskPanel(wx.Panel): |
| 52 | 52 | def __init__(self, parent): |
| 53 | 53 | wx.Panel.__init__(self, parent) |
| 54 | - self.SetBackgroundColour(wx.Colour(255,255,255)) | |
| 54 | + | |
| 55 | + backgroud_colour = wx.Colour(255,255,255) | |
| 56 | + | |
| 57 | + self.SetBackgroundColour(backgroud_colour) | |
| 55 | 58 | self.SetAutoLayout(1) |
| 56 | 59 | |
| 57 | 60 | # Counter for projects loaded in current GUI |
| ... | ... | @@ -64,7 +67,9 @@ class InnerTaskPanel(wx.Panel): |
| 64 | 67 | tooltip = wx.ToolTip(_("Select DICOM or Analyze files to be reconstructed")) |
| 65 | 68 | link_import_local = hl.HyperLinkCtrl(self, -1, _("Import medical images...")) |
| 66 | 69 | link_import_local.SetUnderlines(False, False, False) |
| 70 | + link_import_local.SetBold(True) | |
| 67 | 71 | link_import_local.SetColours("BLACK", "BLACK", "BLACK") |
| 72 | + link_import_local.SetBackgroundColour(backgroud_colour) | |
| 68 | 73 | link_import_local.SetToolTip(tooltip) |
| 69 | 74 | link_import_local.AutoBrowse(False) |
| 70 | 75 | link_import_local.UpdateLink() |
| ... | ... | @@ -82,7 +87,9 @@ class InnerTaskPanel(wx.Panel): |
| 82 | 87 | tooltip = wx.ToolTip(_("Open an existing InVesalius project...")) |
| 83 | 88 | link_open_proj = hl.HyperLinkCtrl(self,-1,_("Open an existing project...")) |
| 84 | 89 | link_open_proj.SetUnderlines(False, False, False) |
| 90 | + link_open_proj.SetBold(True) | |
| 85 | 91 | link_open_proj.SetColours("BLACK", "BLACK", "BLACK") |
| 92 | + link_open_proj.SetBackgroundColour(backgroud_colour) | |
| 86 | 93 | link_open_proj.SetToolTip(tooltip) |
| 87 | 94 | link_open_proj.AutoBrowse(False) |
| 88 | 95 | link_open_proj.UpdateLink() |
| ... | ... | @@ -105,8 +112,10 @@ class InnerTaskPanel(wx.Panel): |
| 105 | 112 | # style=button_style) |
| 106 | 113 | button_import_local = pbtn.PlateButton(self, BTN_IMPORT_LOCAL, "", |
| 107 | 114 | BMP_IMPORT, style=button_style) |
| 115 | + button_import_local.SetBackgroundColour(self.GetBackgroundColour()) | |
| 108 | 116 | button_open_proj = pbtn.PlateButton(self, BTN_OPEN_PROJECT, "", |
| 109 | 117 | BMP_OPEN_PROJECT, style=button_style) |
| 118 | + button_open_proj.SetBackgroundColour(self.GetBackgroundColour()) | |
| 110 | 119 | |
| 111 | 120 | # When using PlaneButton, it is necessary to bind events from parent win |
| 112 | 121 | self.Bind(wx.EVT_BUTTON, self.OnButton) |
| ... | ... | @@ -185,6 +194,7 @@ class InnerTaskPanel(wx.Panel): |
| 185 | 194 | proj_link = hl.HyperLinkCtrl(self, -1, label) |
| 186 | 195 | proj_link.SetUnderlines(False, False, False) |
| 187 | 196 | proj_link.SetColours("BLACK", "BLACK", "BLACK") |
| 197 | + proj_link.SetBackgroundColour(self.GetBackgroundColour()) | |
| 188 | 198 | proj_link.AutoBrowse(False) |
| 189 | 199 | proj_link.UpdateLink() |
| 190 | 200 | proj_link.Bind(hl.EVT_HYPERLINK_LEFT, |
| ... | ... | @@ -201,7 +211,7 @@ class InnerTaskPanel(wx.Panel): |
| 201 | 211 | def OnLinkImport(self, event): |
| 202 | 212 | self.ImportDicom() |
| 203 | 213 | event.Skip() |
| 204 | - | |
| 214 | + | |
| 205 | 215 | def OnLinkImportPACS(self, event): |
| 206 | 216 | self.ImportPACS() |
| 207 | 217 | event.Skip() |
| ... | ... | @@ -210,7 +220,7 @@ class InnerTaskPanel(wx.Panel): |
| 210 | 220 | self.OpenProject() |
| 211 | 221 | event.Skip() |
| 212 | 222 | |
| 213 | - | |
| 223 | + | |
| 214 | 224 | def ImportPACS(self): |
| 215 | 225 | print "TODO: Send Signal - Import DICOM files from PACS" |
| 216 | 226 | ... | ... |
invesalius/gui/task_slice.py
| ... | ... | @@ -65,7 +65,8 @@ class TaskPanel(wx.Panel): |
| 65 | 65 | class InnerTaskPanel(wx.Panel): |
| 66 | 66 | def __init__(self, parent): |
| 67 | 67 | wx.Panel.__init__(self, parent) |
| 68 | - self.SetBackgroundColour(wx.Colour(255,255,255)) | |
| 68 | + backgroud_colour = wx.Colour(255,255,255) | |
| 69 | + self.SetBackgroundColour(backgroud_colour) | |
| 69 | 70 | self.SetAutoLayout(1) |
| 70 | 71 | |
| 71 | 72 | # Image(s) for buttons |
| ... | ... | @@ -76,6 +77,7 @@ class InnerTaskPanel(wx.Panel): |
| 76 | 77 | # Button for creating new surface |
| 77 | 78 | button_new_mask = pbtn.PlateButton(self, BTN_NEW, "", BMP_ADD, style=\ |
| 78 | 79 | pbtn.PB_STYLE_SQUARE | pbtn.PB_STYLE_DEFAULT) |
| 80 | + button_new_mask.SetBackgroundColour(self.GetBackgroundColour()) | |
| 79 | 81 | self.Bind(wx.EVT_BUTTON, self.OnButton) |
| 80 | 82 | |
| 81 | 83 | |
| ... | ... | @@ -83,7 +85,9 @@ class InnerTaskPanel(wx.Panel): |
| 83 | 85 | tooltip = wx.ToolTip(_("Create mask for slice segmentation and editing")) |
| 84 | 86 | link_new_mask = hl.HyperLinkCtrl(self, -1, _("Create new mask")) |
| 85 | 87 | link_new_mask.SetUnderlines(False, False, False) |
| 88 | + link_new_mask.SetBold(True) | |
| 86 | 89 | link_new_mask.SetColours("BLACK", "BLACK", "BLACK") |
| 90 | + link_new_mask.SetBackgroundColour(self.GetBackgroundColour()) | |
| 87 | 91 | link_new_mask.SetToolTip(tooltip) |
| 88 | 92 | link_new_mask.AutoBrowse(False) |
| 89 | 93 | link_new_mask.UpdateLink() |
| ... | ... | @@ -201,7 +205,6 @@ class InnerTaskPanel(wx.Panel): |
| 201 | 205 | class FoldPanel(wx.Panel): |
| 202 | 206 | def __init__(self, parent): |
| 203 | 207 | wx.Panel.__init__(self, parent) |
| 204 | - self.SetBackgroundColour(wx.Colour(0,255,0)) | |
| 205 | 208 | |
| 206 | 209 | inner_panel = InnerFoldPanel(self) |
| 207 | 210 | |
| ... | ... | @@ -223,8 +226,7 @@ class InnerFoldPanel(wx.Panel): |
| 223 | 226 | def __init__(self, parent): |
| 224 | 227 | wx.Panel.__init__(self, parent) |
| 225 | 228 | default_colour = wx.SystemSettings_GetColour(wx.SYS_COLOUR_MENUBAR) |
| 226 | - #self.SetBackgroundColour(default_colour) | |
| 227 | - self.SetBackgroundColour((255, 0, 0)) | |
| 229 | + self.SetBackgroundColour(default_colour) | |
| 228 | 230 | |
| 229 | 231 | # Fold panel and its style settings |
| 230 | 232 | # FIXME: If we dont insert a value in size or if we set wx.DefaultSize, | ... | ... |
invesalius/gui/task_surface.py
| ... | ... | @@ -68,8 +68,8 @@ class InnerTaskPanel(wx.Panel): |
| 68 | 68 | def __init__(self, parent): |
| 69 | 69 | wx.Panel.__init__(self, parent) |
| 70 | 70 | default_colour = self.GetBackgroundColour() |
| 71 | - #self.SetBackgroundColour(wx.Colour(255,255,255)) | |
| 72 | - self.SetBackgroundColour(wx.Colour(0,0,255)) | |
| 71 | + backgroud_colour = wx.Colour(255,255,255) | |
| 72 | + self.SetBackgroundColour(backgroud_colour) | |
| 73 | 73 | self.SetAutoLayout(1) |
| 74 | 74 | |
| 75 | 75 | |
| ... | ... | @@ -80,13 +80,16 @@ class InnerTaskPanel(wx.Panel): |
| 80 | 80 | # Button for creating new surface |
| 81 | 81 | button_new_surface = pbtn.PlateButton(self, BTN_NEW, "", BMP_ADD, style=\ |
| 82 | 82 | pbtn.PB_STYLE_SQUARE | pbtn.PB_STYLE_DEFAULT) |
| 83 | + button_new_surface.SetBackgroundColour(self.GetBackgroundColour()) | |
| 83 | 84 | self.Bind(wx.EVT_BUTTON, self.OnButton) |
| 84 | 85 | |
| 85 | 86 | # Fixed hyperlink items |
| 86 | 87 | tooltip = wx.ToolTip(_("Create 3D surface based on a mask")) |
| 87 | 88 | link_new_surface = hl.HyperLinkCtrl(self, -1, _("Create new 3D surface")) |
| 88 | 89 | link_new_surface.SetUnderlines(False, False, False) |
| 90 | + link_new_surface.SetBold(True) | |
| 89 | 91 | link_new_surface.SetColours("BLACK", "BLACK", "BLACK") |
| 92 | + link_new_surface.SetBackgroundColour(self.GetBackgroundColour()) | |
| 90 | 93 | link_new_surface.SetToolTip(tooltip) |
| 91 | 94 | link_new_surface.AutoBrowse(False) |
| 92 | 95 | link_new_surface.UpdateLink() |
| ... | ... | @@ -177,7 +180,6 @@ class InnerTaskPanel(wx.Panel): |
| 177 | 180 | class FoldPanel(wx.Panel): |
| 178 | 181 | def __init__(self, parent): |
| 179 | 182 | wx.Panel.__init__(self, parent, size=(50,700)) |
| 180 | - self.SetBackgroundColour(wx.Colour(0,255,0)) | |
| 181 | 183 | |
| 182 | 184 | inner_panel = InnerFoldPanel(self) |
| 183 | 185 | |
| ... | ... | @@ -262,8 +264,7 @@ class SurfaceTools(wx.Panel): |
| 262 | 264 | def __init__(self, parent): |
| 263 | 265 | wx.Panel.__init__(self, parent) |
| 264 | 266 | default_colour = wx.SystemSettings_GetColour(wx.SYS_COLOUR_MENUBAR) |
| 265 | - #self.SetBackgroundColour(default_colour) | |
| 266 | - self.SetBackgroundColour((0, 255, 0)) | |
| 267 | + self.SetBackgroundColour(default_colour) | |
| 267 | 268 | |
| 268 | 269 | #self.SetBackgroundColour(wx.Colour(255,255,255)) |
| 269 | 270 | self.SetAutoLayout(1) |
| ... | ... | @@ -397,8 +398,7 @@ class SurfaceProperties(wx.Panel): |
| 397 | 398 | def __init__(self, parent): |
| 398 | 399 | wx.Panel.__init__(self, parent) |
| 399 | 400 | default_colour = wx.SystemSettings_GetColour(wx.SYS_COLOUR_MENUBAR) |
| 400 | - #self.SetBackgroundColour(default_colour) | |
| 401 | - self.SetBackgroundColour((255, 0, 0)) | |
| 401 | + self.SetBackgroundColour(default_colour) | |
| 402 | 402 | |
| 403 | 403 | self.surface_dict = utl.TwoWaysDictionary() |
| 404 | 404 | |
| ... | ... | @@ -458,7 +458,7 @@ class SurfaceProperties(wx.Panel): |
| 458 | 458 | #sizer.Add(cb, 0, wx.GROW|wx.EXPAND|wx.RIGHT|wx.LEFT|wx.TOP|wx.BOTTOM, 5) |
| 459 | 459 | sizer.Fit(self) |
| 460 | 460 | |
| 461 | - self.SetSizer(sizer) | |
| 461 | + self.SetSizerAndFit(sizer) | |
| 462 | 462 | self.Update() |
| 463 | 463 | #self.SetAutoLayout(1) |
| 464 | 464 | ... | ... |