iconization of the properties window together with the main to

fix blocking on wxGTK;

do not put Open/Save/... toolbar icons on Mac - they are ugly


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45868 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Roman Rolinsky
2007-05-07 20:10:53 +00:00
parent 1feeb78361
commit 2702a0c1bf

View File

@@ -205,6 +205,10 @@ class Frame(wx.Frame):
# Create toolbar
tb = self.CreateToolBar(wx.TB_HORIZONTAL | wx.NO_BORDER | wx.TB_FLAT)
tb.SetToolBitmapSize((24,24))
# Hide some icons on Mac to reduce the toolbar size,
# and comply more with the Apple LnF, besides
# wxMac icons are ugly
if wx.Platform != '__WXMAC__':
new_bmp = wx.ArtProvider.GetBitmap(wx.ART_NORMAL_FILE, wx.ART_TOOLBAR)
open_bmp = wx.ArtProvider.GetBitmap(wx.ART_FILE_OPEN, wx.ART_TOOLBAR)
save_bmp = wx.ArtProvider.GetBitmap(wx.ART_FILE_SAVE, wx.ART_TOOLBAR)
@@ -213,7 +217,6 @@ class Frame(wx.Frame):
cut_bmp = wx.ArtProvider.GetBitmap(wx.ART_CUT, wx.ART_TOOLBAR)
copy_bmp = wx.ArtProvider.GetBitmap(wx.ART_COPY, wx.ART_TOOLBAR)
paste_bmp= wx.ArtProvider.GetBitmap(wx.ART_PASTE, wx.ART_TOOLBAR)
tb.AddSimpleTool(wx.ID_NEW, new_bmp, 'New', 'New file')
tb.AddSimpleTool(wx.ID_OPEN, open_bmp, 'Open', 'Open file')
tb.AddSimpleTool(wx.ID_SAVE, save_bmp, 'Save', 'Save file')
@@ -328,9 +331,7 @@ class Frame(wx.Frame):
(conf.panelWidth, conf.panelHeight))
self.miniFrame = miniFrame
sizer2 = wx.BoxSizer()
miniFrame.SetAutoLayout(True)
miniFrame.SetSizer(sizer2)
wx.EVT_CLOSE(self.miniFrame, self.OnCloseMiniFrame)
# Create panel for parameters
global panel
if conf.embedPanel:
@@ -1368,10 +1369,6 @@ Homepage: http://xrced.sourceforge.net\
finally:
self.inIdle = False
# We don't let close panel window
def OnCloseMiniFrame(self, evt):
return
def OnIconize(self, evt):
if evt.Iconized():
conf.x, conf.y = self.GetPosition()
@@ -1381,10 +1378,10 @@ Homepage: http://xrced.sourceforge.net\
else:
conf.panelX, conf.panelY = self.miniFrame.GetPosition()
conf.panelWidth, conf.panelHeight = self.miniFrame.GetSize()
self.miniFrame.Iconize()
self.miniFrame.Show(False)
else:
if not conf.embedPanel:
self.miniFrame.Iconize(False)
self.miniFrame.Show(True)
evt.Skip()
def OnCloseWindow(self, evt):
@@ -1397,7 +1394,10 @@ Homepage: http://xrced.sourceforge.net\
panel.RemovePage(1)
if not self.IsIconized():
conf.x, conf.y = self.GetPosition()
if wx.Platform == '__WXMAC__':
conf.width, conf.height = self.GetClientSize()
else:
conf.width, conf.height = self.GetSize()
if conf.embedPanel:
conf.sashPos = self.splitter.GetSashPosition()
else:
@@ -1763,6 +1763,8 @@ Please upgrade wxWidgets to %d.%d.%d or higher.''' % MinWxVersion)
wx.FileSystem.AddHandler(wx.MemoryFSHandler())
# Create main frame
frame = Frame(pos, size)
# Mac does not set the correct size
if wx.Platform == '__WXMAC__':
frame.SetClientSize(size)
frame.Show(True)