X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5cd66f076fa441f33a374b46e8683abdd5314725..d0ee33f5c6908b4ac5e1364381f0ef00942e3936:/wxPython/wx/tools/XRCed/panel.py diff --git a/wxPython/wx/tools/XRCed/panel.py b/wxPython/wx/tools/XRCed/panel.py index be65752e2e..67b00f40e1 100644 --- a/wxPython/wx/tools/XRCed/panel.py +++ b/wxPython/wx/tools/XRCed/panel.py @@ -37,6 +37,7 @@ class Panel(wxNotebook): self.AddPage(self.page1, 'Properties') # Second page self.page2 = wxScrolledWindow(self, -1) + self.page2.Hide() sizer = wxBoxSizer() sizer.Add(wxBoxSizer()) # dummy sizer self.page2.SetAutoLayout(True) @@ -135,6 +136,8 @@ class Panel(wxNotebook): if not self.GetPageCount() == 2: self.AddPage(self.page2, 'Style') self.page2.Layout() + if 'wxGTK' in wx.PlatformInfo: + self.page2.Show(True) size = self.page2.GetSizer().GetMinSize() self.page2.SetScrollbars(1, 1, size.width, size.height, 0, 0, True) else: @@ -168,8 +171,6 @@ class Panel(wxNotebook): class ParamPage(wxPanel): def __init__(self, parent, xxx): wxPanel.__init__(self, parent, -1) - self.SetBackgroundColour(parent.GetBackgroundColour()) - self.SetForegroundColour(parent.GetForegroundColour()) self.xxx = xxx # Register event handlers for id in paramIDs.values(): @@ -198,7 +199,10 @@ class ParamPage(wxPanel): xxx.params[param] = xxxParam(elem) # Find place to put new element: first present element after param found = False - paramStyles = xxx.allParams + xxx.styles + if xxx.hasStyle: + paramStyles = xxx.allParams + xxx.styles + else: + paramStyles = xxx.allParams for p in paramStyles[paramStyles.index(param) + 1:]: # Content params don't have same type if xxx.params.has_key(p) and p != 'content':