From f8588c41b4aed905d0ae3b279bee43fac86f455f Mon Sep 17 00:00:00 2001 From: HomeWorld Date: Fri, 12 Nov 2010 15:39:31 +0200 Subject: [PATCH 01/11] Resize fix for graphframe, have only the graph canvas adjust its size --- gui/graphFrame.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gui/graphFrame.py b/gui/graphFrame.py index e81797291..63e5bfe11 100644 --- a/gui/graphFrame.py +++ b/gui/graphFrame.py @@ -67,16 +67,16 @@ class GraphFrame(wx.Frame): self.subplot = self.figure.add_subplot(111) self.subplot.grid(True) - self.mainSizer.Add(self.canvas, 0, wx.EXPAND) + self.mainSizer.Add(self.canvas, 1, wx.EXPAND) self.gridPanel = wx.Panel(self) - self.mainSizer.Add(self.gridPanel, 1, wx.EXPAND) + self.mainSizer.Add(self.gridPanel, 0, wx.EXPAND) dummyBox = wx.BoxSizer(wx.VERTICAL) self.gridPanel.SetSizer(dummyBox) self.gridSizer = wx.FlexGridSizer(0, 2) - self.gridSizer.AddGrowableCol(0) + self.gridSizer.AddGrowableCol(1) dummyBox.Add(self.gridSizer, 0, wx.EXPAND) for view in Graph.views: From 55276d692a3ab38d5e06db0095f4bcfa1725dced Mon Sep 17 00:00:00 2001 From: HomeWorld Date: Fri, 12 Nov 2010 15:58:33 +0200 Subject: [PATCH 02/11] Removed InitAlpha --- miniframe.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/miniframe.py b/miniframe.py index 0f8fbfdc2..3f600b16c 100755 --- a/miniframe.py +++ b/miniframe.py @@ -408,7 +408,7 @@ class PFAddRenderer: canvas.SetMaskColour((13,22,31)) img = canvas.ConvertToImage() - img.InitAlpha() +# img.InitAlpha() img = img.AdjustChannels(1, 1, 1, 0.6) img = img.Blur(1) bbmp = wx.BitmapFromImage(img) @@ -445,7 +445,7 @@ class PFAddRenderer: img = canvas.ConvertToImage() - img.InitAlpha() +# img.InitAlpha() img = img.AdjustChannels(1, 1, 1, 0.3) bbmp = wx.BitmapFromImage(img) From c4ca8dbfea69937445254f03a5eea7e86b5179a8 Mon Sep 17 00:00:00 2001 From: HomeWorld Date: Fri, 12 Nov 2010 16:08:04 +0200 Subject: [PATCH 03/11] Select a bitmap in temp memdc --- miniframe.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/miniframe.py b/miniframe.py index 3f600b16c..cb4ffdb35 100755 --- a/miniframe.py +++ b/miniframe.py @@ -66,10 +66,15 @@ class PFTabRenderer: return self.CopyRegion(self.closeBtnRegion) def GetMinSize(self): + tbmp = wx.EmptyBitmap(1,1) mdc = wx.MemoryDC() + mdc.SelectObject(tbmp) + mdc.SetFont(self.font) textSizeX, textSizeY = mdc.GetTextExtent(self.text) totalSize = self.lrZoneWidth * 2 + textSizeX + self.cbSize*2 if self.closeButton else 0 + + mdc.SelectObject(wx.NullBitmap) return (totalSize, self.tabHeight) From 383604715cfbaccf70f05bc7119b8d5a9c5ba2e6 Mon Sep 17 00:00:00 2001 From: HomeWorld Date: Fri, 12 Nov 2010 16:19:01 +0200 Subject: [PATCH 04/11] Disabled efx --- miniframe.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/miniframe.py b/miniframe.py index cb4ffdb35..314ecbf82 100755 --- a/miniframe.py +++ b/miniframe.py @@ -737,7 +737,7 @@ class PFTabsContainer(wx.Window): width = tab.tabWidth - self.inclination*2 posx, posy = tab.GetPosition() if not tab.IsSelected(): - mdc.DrawBitmap(self.efxBmp, posx, posy - 1, True ) +# mdc.DrawBitmap(self.efxBmp, posx, posy - 1, True ) # img = tab.Render().ConvertToImage() # img = img.AdjustChannels(1, 1, 1, 0.8) # bmp = wx.BitmapFromImage(img) @@ -746,7 +746,7 @@ class PFTabsContainer(wx.Window): selected = tab if selected: posx, posy = selected.GetPosition() - mdc.DrawBitmap(self.efxBmp, posx, posy - 1, True) +# mdc.DrawBitmap(self.efxBmp, posx, posy - 1, True) bmp = selected.Render() if self.dragging: img = bmp.ConvertToImage() From 2c6f1c1e867f89ef66890bec6e2f93fc8f9715be Mon Sep 17 00:00:00 2001 From: HomeWorld Date: Fri, 12 Nov 2010 16:26:36 +0200 Subject: [PATCH 05/11] Revert "Disabled efx" This reverts commit 383604715cfbaccf70f05bc7119b8d5a9c5ba2e6. --- miniframe.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/miniframe.py b/miniframe.py index 314ecbf82..cb4ffdb35 100755 --- a/miniframe.py +++ b/miniframe.py @@ -737,7 +737,7 @@ class PFTabsContainer(wx.Window): width = tab.tabWidth - self.inclination*2 posx, posy = tab.GetPosition() if not tab.IsSelected(): -# mdc.DrawBitmap(self.efxBmp, posx, posy - 1, True ) + mdc.DrawBitmap(self.efxBmp, posx, posy - 1, True ) # img = tab.Render().ConvertToImage() # img = img.AdjustChannels(1, 1, 1, 0.8) # bmp = wx.BitmapFromImage(img) @@ -746,7 +746,7 @@ class PFTabsContainer(wx.Window): selected = tab if selected: posx, posy = selected.GetPosition() -# mdc.DrawBitmap(self.efxBmp, posx, posy - 1, True) + mdc.DrawBitmap(self.efxBmp, posx, posy - 1, True) bmp = selected.Render() if self.dragging: img = bmp.ConvertToImage() From 02be93750ab4e6eba8a4fc9d52e9958ca940f16e Mon Sep 17 00:00:00 2001 From: HomeWorld Date: Fri, 12 Nov 2010 16:26:50 +0200 Subject: [PATCH 06/11] Revert "Select a bitmap in temp memdc" This reverts commit c4ca8dbfea69937445254f03a5eea7e86b5179a8. --- miniframe.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/miniframe.py b/miniframe.py index cb4ffdb35..3f600b16c 100755 --- a/miniframe.py +++ b/miniframe.py @@ -66,15 +66,10 @@ class PFTabRenderer: return self.CopyRegion(self.closeBtnRegion) def GetMinSize(self): - tbmp = wx.EmptyBitmap(1,1) mdc = wx.MemoryDC() - mdc.SelectObject(tbmp) - mdc.SetFont(self.font) textSizeX, textSizeY = mdc.GetTextExtent(self.text) totalSize = self.lrZoneWidth * 2 + textSizeX + self.cbSize*2 if self.closeButton else 0 - - mdc.SelectObject(wx.NullBitmap) return (totalSize, self.tabHeight) From 1631c4726792720fb344cb4769a5e364eafa0112 Mon Sep 17 00:00:00 2001 From: HomeWorld Date: Fri, 12 Nov 2010 16:27:12 +0200 Subject: [PATCH 07/11] Revert "Removed InitAlpha" This reverts commit 55276d692a3ab38d5e06db0095f4bcfa1725dced. --- miniframe.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/miniframe.py b/miniframe.py index 3f600b16c..0f8fbfdc2 100755 --- a/miniframe.py +++ b/miniframe.py @@ -408,7 +408,7 @@ class PFAddRenderer: canvas.SetMaskColour((13,22,31)) img = canvas.ConvertToImage() -# img.InitAlpha() + img.InitAlpha() img = img.AdjustChannels(1, 1, 1, 0.6) img = img.Blur(1) bbmp = wx.BitmapFromImage(img) @@ -445,7 +445,7 @@ class PFAddRenderer: img = canvas.ConvertToImage() -# img.InitAlpha() + img.InitAlpha() img = img.AdjustChannels(1, 1, 1, 0.3) bbmp = wx.BitmapFromImage(img) From 1d85779552a8f61ea4b6ae88d00c65c502c0f88d Mon Sep 17 00:00:00 2001 From: HomeWorld Date: Fri, 12 Nov 2010 16:36:30 +0200 Subject: [PATCH 08/11] Header update for miniframe --- miniframe.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/miniframe.py b/miniframe.py index 0f8fbfdc2..6879bfddb 100755 --- a/miniframe.py +++ b/miniframe.py @@ -1,3 +1,13 @@ +# --------------------------------------------------------------------------------- # +# Pyfa's custom Notebook python IMPLEMENTATION +# +# Darriele (homeworld using gmail point com) - 10/27/2010 +# Updated: 11/11/2010 +# +# --------------------------------------------------------------------------------- # + + + #!/usr/bin/env python import wx import copy From 1c6e9eec4d2485e880c52b5ae12993680049c4f1 Mon Sep 17 00:00:00 2001 From: HomeWorld Date: Fri, 12 Nov 2010 16:37:49 +0200 Subject: [PATCH 09/11] Core stuff --- miniframe.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/miniframe.py b/miniframe.py index 6879bfddb..ca4490c8c 100755 --- a/miniframe.py +++ b/miniframe.py @@ -1,5 +1,5 @@ # --------------------------------------------------------------------------------- # -# Pyfa's custom Notebook python IMPLEMENTATION +# Pyfa's custom Notebook core python IMPLEMENTATION # # Darriele (homeworld using gmail point com) - 10/27/2010 # Updated: 11/11/2010 From d97461739c36a48fc8edd123f89c8d6fcc3975eb Mon Sep 17 00:00:00 2001 From: Corollax Date: Fri, 12 Nov 2010 12:50:58 -0600 Subject: [PATCH 10/11] Moved the shebang line It needs to be at the top of the file to work. --- miniframe.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/miniframe.py b/miniframe.py index ca4490c8c..0cebadcc4 100755 --- a/miniframe.py +++ b/miniframe.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python + # --------------------------------------------------------------------------------- # # Pyfa's custom Notebook core python IMPLEMENTATION # @@ -6,9 +8,6 @@ # # --------------------------------------------------------------------------------- # - - -#!/usr/bin/env python import wx import copy import time From 3a7110a2e87f96845dd1f7b8866ea40a605cf6e0 Mon Sep 17 00:00:00 2001 From: HomeWorld Date: Fri, 12 Nov 2010 21:13:22 +0200 Subject: [PATCH 11/11] Guessing the right size ftw --- gui/shipBrowser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/shipBrowser.py b/gui/shipBrowser.py index b526c1c19..832910fb7 100644 --- a/gui/shipBrowser.py +++ b/gui/shipBrowser.py @@ -1283,7 +1283,7 @@ class PFBitmapFrame(wx.Frame): self.timer = wx.Timer(self,wx.ID_ANY) self.direction = 1 self.transp = 0 - self.SetSize((bitmap.GetWidth(),bitmap.GetHeight())) + self.SetMinSize((bitmap.GetWidth(),bitmap.GetHeight())) if 'wxMSW' in wx.PlatformInfo: self.SetRoundShape() else: