Commit 00447668779867358e152d85820f580b6f386ea2

Authored by tatiana
1 parent 42d73acf

ENH: FoldPanel header colour

invesalius/gui/task_slice.py
@@ -60,7 +60,6 @@ class TaskPanel(wx.Panel): @@ -60,7 +60,6 @@ class TaskPanel(wx.Panel):
60 class InnerTaskPanel(wx.Panel): 60 class InnerTaskPanel(wx.Panel):
61 def __init__(self, parent): 61 def __init__(self, parent):
62 wx.Panel.__init__(self, parent) 62 wx.Panel.__init__(self, parent)
63 - default_colour = self.GetBackgroundColour()  
64 self.SetBackgroundColour(wx.Colour(255,255,255)) 63 self.SetBackgroundColour(wx.Colour(255,255,255))
65 self.SetAutoLayout(1) 64 self.SetAutoLayout(1)
66 65
@@ -91,7 +90,15 @@ class InnerTaskPanel(wx.Panel): @@ -91,7 +90,15 @@ class InnerTaskPanel(wx.Panel):
91 line_new.Add(button_new_mask, 0, wx.ALL|wx.EXPAND|wx.GROW, 0) 90 line_new.Add(button_new_mask, 0, wx.ALL|wx.EXPAND|wx.GROW, 0)
92 91
93 92
94 - # Folde panel which contains mask properties and edition tools 93 + # Fold panel which contains mask properties and edition tools
  94 + #print wx.SystemSettings_GetColour(wx.SYS_COLOUR_BACKGROUND)
  95 + #print wx.SystemSettings_GetColour(wx.SYS_COLOUR_APPWORKSPACE)
  96 + #print wx.SystemSettings_GetColour(wx.SYS_COLOUR_BTNFACE)
  97 + #print wx.SystemSettings_GetColour(wx.SYS_COLOUR_DESKTOP)
  98 + #print wx.SystemSettings_GetColour(wx.SYS_COLOUR_MENUBAR)
  99 + #print wx.SystemSettings_GetColour(wx.SYS_COLOUR_SCROLLBAR)
  100 + #print wx.SystemSettings_GetColour(wx.SYS_COLOUR_MENUHILIGHT)
  101 + default_colour = wx.SystemSettings_GetColour(wx.SYS_COLOUR_MENUBAR)
95 fold_panel = FoldPanel(self) 102 fold_panel = FoldPanel(self)
96 fold_panel.SetBackgroundColour(default_colour) 103 fold_panel.SetBackgroundColour(default_colour)
97 self.fold_panel = fold_panel 104 self.fold_panel = fold_panel
@@ -165,8 +172,8 @@ class FoldPanel(wx.Panel): @@ -165,8 +172,8 @@ class FoldPanel(wx.Panel):
165 class InnerFoldPanel(wx.Panel): 172 class InnerFoldPanel(wx.Panel):
166 def __init__(self, parent): 173 def __init__(self, parent):
167 wx.Panel.__init__(self, parent) 174 wx.Panel.__init__(self, parent)
168 - self.SetBackgroundColour(wx.Colour(221, 221, 221, 255))  
169 - #self.SetBackgroundColour(wx.Colour(0,0,0)) 175 + default_colour = wx.SystemSettings_GetColour(wx.SYS_COLOUR_MENUBAR)
  176 + self.SetBackgroundColour(default_colour)
170 177
171 # Fold panel and its style settings 178 # Fold panel and its style settings
172 # FIXME: If we dont insert a value in size or if we set wx.DefaultSize, 179 # FIXME: If we dont insert a value in size or if we set wx.DefaultSize,
@@ -179,8 +186,9 @@ class InnerFoldPanel(wx.Panel): @@ -179,8 +186,9 @@ class InnerFoldPanel(wx.Panel):
179 186
180 # Fold panel style 187 # Fold panel style
181 style = fpb.CaptionBarStyle() 188 style = fpb.CaptionBarStyle()
182 - style.SetCaptionStyle(fpb.CAPTIONBAR_RECTANGLE)  
183 - style.SetSecondColour(wx.Colour(255,255,255)) 189 + style.SetCaptionStyle(fpb.CAPTIONBAR_GRADIENT_V)
  190 + style.SetFirstColour(default_colour)
  191 + style.SetSecondColour(default_colour)
184 192
185 # Fold 1 - Mask properties 193 # Fold 1 - Mask properties
186 item = fold_panel.AddFoldPanel("Mask properties", collapsed=True) 194 item = fold_panel.AddFoldPanel("Mask properties", collapsed=True)
@@ -212,7 +220,6 @@ class InnerFoldPanel(wx.Panel): @@ -212,7 +220,6 @@ class InnerFoldPanel(wx.Panel):
212 class MaskProperties(wx.Panel): 220 class MaskProperties(wx.Panel):
213 def __init__(self, parent): 221 def __init__(self, parent):
214 wx.Panel.__init__(self, parent, size=(50,240)) 222 wx.Panel.__init__(self, parent, size=(50,240))
215 - self.SetBackgroundColour(wx.Colour(221, 221, 221, 255))  
216 223
217 ## LINE 1 224 ## LINE 1
218 225
@@ -368,7 +375,8 @@ class MaskProperties(wx.Panel): @@ -368,7 +375,8 @@ class MaskProperties(wx.Panel):
368 class EditionTools(wx.Panel): 375 class EditionTools(wx.Panel):
369 def __init__(self, parent): 376 def __init__(self, parent):
370 wx.Panel.__init__(self, parent, size=(50,240)) 377 wx.Panel.__init__(self, parent, size=(50,240))
371 - self.SetBackgroundColour(wx.Colour(221, 221, 221, 255)) 378 + default_colour = wx.SystemSettings_GetColour(wx.SYS_COLOUR_MENUBAR)
  379 + self.SetBackgroundColour(default_colour)
372 380
373 ## LINE 1 381 ## LINE 1
374 text1 = wx.StaticText(self, -1, "Choose brush type, size or operation:") 382 text1 = wx.StaticText(self, -1, "Choose brush type, size or operation:")
invesalius/gui/task_surface.py
@@ -131,6 +131,8 @@ class InnerTaskPanel(wx.Panel): @@ -131,6 +131,8 @@ class InnerTaskPanel(wx.Panel):
131 dlg.Destroy() 131 dlg.Destroy()
132 if evt: 132 if evt:
133 evt.Skip() 133 evt.Skip()
  134 + #default_colour = wx.SystemSettings_GetColour(wx.SYS_COLOUR_MENUBAR)
  135 + #self.SetBackgroundColour(default_colour)
134 136
135 class NewSurfaceDialog(wx.Dialog): 137 class NewSurfaceDialog(wx.Dialog):
136 def __init__(self, parent, ID, title, size=wx.DefaultSize, 138 def __init__(self, parent, ID, title, size=wx.DefaultSize,
@@ -223,8 +225,8 @@ class FoldPanel(wx.Panel): @@ -223,8 +225,8 @@ class FoldPanel(wx.Panel):
223 class InnerFoldPanel(wx.Panel): 225 class InnerFoldPanel(wx.Panel):
224 def __init__(self, parent): 226 def __init__(self, parent):
225 wx.Panel.__init__(self, parent) 227 wx.Panel.__init__(self, parent)
226 - self.SetBackgroundColour(wx.Colour(221, 221, 221, 255))  
227 - #self.SetBackgroundColour(wx.Colour(0,0,0)) 228 + default_colour = wx.SystemSettings_GetColour(wx.SYS_COLOUR_MENUBAR)
  229 + self.SetBackgroundColour(default_colour)
228 230
229 # Fold panel and its style settings 231 # Fold panel and its style settings
230 # FIXME: If we dont insert a value in size or if we set wx.DefaultSize, 232 # FIXME: If we dont insert a value in size or if we set wx.DefaultSize,
@@ -237,8 +239,9 @@ class InnerFoldPanel(wx.Panel): @@ -237,8 +239,9 @@ class InnerFoldPanel(wx.Panel):
237 239
238 # Fold panel style 240 # Fold panel style
239 style = fpb.CaptionBarStyle() 241 style = fpb.CaptionBarStyle()
240 - style.SetCaptionStyle(fpb.CAPTIONBAR_RECTANGLE)  
241 - style.SetSecondColour(wx.Colour(255,255,255)) 242 + style.SetCaptionStyle(fpb.CAPTIONBAR_GRADIENT_V)
  243 + style.SetFirstColour(default_colour)
  244 + style.SetSecondColour(default_colour)
242 245
243 # Fold 1 - Surface properties 246 # Fold 1 - Surface properties
244 item = fold_panel.AddFoldPanel("Surface properties", collapsed=True) 247 item = fold_panel.AddFoldPanel("Surface properties", collapsed=True)
@@ -266,7 +269,8 @@ class InnerFoldPanel(wx.Panel): @@ -266,7 +269,8 @@ class InnerFoldPanel(wx.Panel):
266 class SurfaceProperties(wx.Panel): 269 class SurfaceProperties(wx.Panel):
267 def __init__(self, parent): 270 def __init__(self, parent):
268 wx.Panel.__init__(self, parent, size=(50,240)) 271 wx.Panel.__init__(self, parent, size=(50,240))
269 - self.SetBackgroundColour(wx.Colour(221, 221, 221, 255)) 272 + default_colour = wx.SystemSettings_GetColour(wx.SYS_COLOUR_MENUBAR)
  273 + self.SetBackgroundColour(default_colour)
270 274
271 ## LINE 1 275 ## LINE 1
272 276
@@ -372,7 +376,8 @@ class SurfaceProperties(wx.Panel): @@ -372,7 +376,8 @@ class SurfaceProperties(wx.Panel):
372 class QualityAdjustment(wx.Panel): 376 class QualityAdjustment(wx.Panel):
373 def __init__(self, parent): 377 def __init__(self, parent):
374 wx.Panel.__init__(self, parent, size=(50,240)) 378 wx.Panel.__init__(self, parent, size=(50,240))
375 - self.SetBackgroundColour(wx.Colour(221, 221, 221, 255)) 379 + default_colour = wx.SystemSettings_GetColour(wx.SYS_COLOUR_MENUBAR)
  380 + self.SetBackgroundColour(default_colour)
376 381
377 # LINE 1 382 # LINE 1
378 combo_quality = wx.ComboBox(self, -1, "", choices= QUALITY_LIST, 383 combo_quality = wx.ComboBox(self, -1, "", choices= QUALITY_LIST,