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 60 class InnerTaskPanel(wx.Panel):
61 61 def __init__(self, parent):
62 62 wx.Panel.__init__(self, parent)
63   - default_colour = self.GetBackgroundColour()
64 63 self.SetBackgroundColour(wx.Colour(255,255,255))
65 64 self.SetAutoLayout(1)
66 65  
... ... @@ -91,7 +90,15 @@ class InnerTaskPanel(wx.Panel):
91 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 102 fold_panel = FoldPanel(self)
96 103 fold_panel.SetBackgroundColour(default_colour)
97 104 self.fold_panel = fold_panel
... ... @@ -165,8 +172,8 @@ class FoldPanel(wx.Panel):
165 172 class InnerFoldPanel(wx.Panel):
166 173 def __init__(self, parent):
167 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 178 # Fold panel and its style settings
172 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 186  
180 187 # Fold panel style
181 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 193 # Fold 1 - Mask properties
186 194 item = fold_panel.AddFoldPanel("Mask properties", collapsed=True)
... ... @@ -212,7 +220,6 @@ class InnerFoldPanel(wx.Panel):
212 220 class MaskProperties(wx.Panel):
213 221 def __init__(self, parent):
214 222 wx.Panel.__init__(self, parent, size=(50,240))
215   - self.SetBackgroundColour(wx.Colour(221, 221, 221, 255))
216 223  
217 224 ## LINE 1
218 225  
... ... @@ -368,7 +375,8 @@ class MaskProperties(wx.Panel):
368 375 class EditionTools(wx.Panel):
369 376 def __init__(self, parent):
370 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 381 ## LINE 1
374 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 131 dlg.Destroy()
132 132 if evt:
133 133 evt.Skip()
  134 + #default_colour = wx.SystemSettings_GetColour(wx.SYS_COLOUR_MENUBAR)
  135 + #self.SetBackgroundColour(default_colour)
134 136  
135 137 class NewSurfaceDialog(wx.Dialog):
136 138 def __init__(self, parent, ID, title, size=wx.DefaultSize,
... ... @@ -223,8 +225,8 @@ class FoldPanel(wx.Panel):
223 225 class InnerFoldPanel(wx.Panel):
224 226 def __init__(self, parent):
225 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 231 # Fold panel and its style settings
230 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 239  
238 240 # Fold panel style
239 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 246 # Fold 1 - Surface properties
244 247 item = fold_panel.AddFoldPanel("Surface properties", collapsed=True)
... ... @@ -266,7 +269,8 @@ class InnerFoldPanel(wx.Panel):
266 269 class SurfaceProperties(wx.Panel):
267 270 def __init__(self, parent):
268 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 275 ## LINE 1
272 276  
... ... @@ -372,7 +376,8 @@ class SurfaceProperties(wx.Panel):
372 376 class QualityAdjustment(wx.Panel):
373 377 def __init__(self, parent):
374 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 382 # LINE 1
378 383 combo_quality = wx.ComboBox(self, -1, "", choices= QUALITY_LIST,
... ...