Skip to content

Commit 15dc8c8

Browse files
committed
Larger default window
1 parent 1ac63fa commit 15dc8c8

File tree

5 files changed

+11
-9
lines changed

5 files changed

+11
-9
lines changed

SparkFunKiCadBOMGenerator/dialog/dialog.py

+2
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ def OnSize(self, event):
7171
newWidth = -1
7272
self.nonBomGrid.SetColSize(cols - 1, newWidth)
7373

74+
#self.SetTitle(_APP_NAME + " - " + _APP_VERSION + " {}x{}".format(size.width, size.height))
75+
7476
if event is not None:
7577
event.Skip()
7678

SparkFunKiCadBOMGenerator/dialog/dialog_text_base.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
class DIALOG_TEXT_BASE ( wx.Dialog ):
2222

2323
def __init__( self, parent ):
24-
wx.Dialog.__init__ ( self, parent, id = wx.ID_ANY, title = _(u"SparkFun KiCad BOM Generator"), pos = wx.DefaultPosition, size = wx.Size( 450,550 ), style = wx.DEFAULT_DIALOG_STYLE|wx.RESIZE_BORDER|wx.SYSTEM_MENU )
24+
wx.Dialog.__init__ ( self, parent, id = wx.ID_ANY, title = _(u"SparkFun KiCad BOM Generator"), pos = wx.DefaultPosition, size = wx.Size( 900,650 ), style = wx.DEFAULT_DIALOG_STYLE|wx.RESIZE_BORDER|wx.SYSTEM_MENU )
2525

2626
self.SetSizeHints( wx.Size( -1,-1 ), wx.DefaultSize )
2727

@@ -47,7 +47,7 @@ def __init__( self, parent ):
4747

4848
bomSizer.Add( self.bomLabel, 0, wx.ALIGN_LEFT|wx.ALL|wx.EXPAND, 5 )
4949

50-
self.bomGrid = wx.grid.Grid( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.FULL_REPAINT_ON_RESIZE )
50+
self.bomGrid = wx.grid.Grid( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, 0 )
5151

5252
# Grid
5353
self.bomGrid.CreateGrid( 1, 5 )
@@ -102,7 +102,7 @@ def __init__( self, parent ):
102102

103103
nonBomSizer.Add( self.nonBomLabel, 0, wx.ALIGN_LEFT|wx.ALL|wx.EXPAND, 5 )
104104

105-
self.nonBomGrid = wx.grid.Grid( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.FULL_REPAINT_ON_RESIZE )
105+
self.nonBomGrid = wx.grid.Grid( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, 0 )
106106

107107
# Grid
108108
self.nonBomGrid.CreateGrid( 1, 4 )

SparkFunKiCadBOMGenerator/plugin.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -143,12 +143,12 @@ def Run(self):
143143
if row > 0:
144144
dlg.bomGrid.AppendRows()
145145
dlg.bomGrid.SetCellValue(row, 0, str(bom_items[name]['Qty']))
146+
if bom_items[name]['PROD_ID'] == "NONE":
147+
dlg.bomGrid.SetCellTextColour(row, 1, wx.RED)
146148
dlg.bomGrid.SetCellValue(row, 1, str(bom_items[name]['PROD_ID']))
147149
dlg.bomGrid.SetCellValue(row, 2, str(bom_items[name]['Refs']))
148150
dlg.bomGrid.SetCellValue(row, 3, str(bom_items[name]['Value']))
149151
dlg.bomGrid.SetCellValue(row, 4, str(bom_items[name]['Package']))
150-
if bom_items[name]['PROD_ID'] == "NONE":
151-
dlg.bomGrid.SetCellTextColour(row, 1, wx.RED)
152152
row += 1
153153

154154
# Copy non_bom_items into grid
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "1.0.0"
1+
__version__ = "1.0.1"

text_dialog.fbp

+3-3
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
<property name="minimum_size">-1,-1</property>
4848
<property name="name">DIALOG_TEXT_BASE</property>
4949
<property name="pos"></property>
50-
<property name="size">450,550</property>
50+
<property name="size">900,650</property>
5151
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxSYSTEM_MENU</property>
5252
<property name="subclass">; ; forward_declare</property>
5353
<property name="title">SparkFun KiCad BOM Generator</property>
@@ -230,7 +230,7 @@
230230
<property name="tooltip"></property>
231231
<property name="window_extra_style"></property>
232232
<property name="window_name"></property>
233-
<property name="window_style">wxFULL_REPAINT_ON_RESIZE</property>
233+
<property name="window_style"></property>
234234
</object>
235235
</object>
236236
</object>
@@ -455,7 +455,7 @@
455455
<property name="tooltip"></property>
456456
<property name="window_extra_style"></property>
457457
<property name="window_name"></property>
458-
<property name="window_style">wxFULL_REPAINT_ON_RESIZE</property>
458+
<property name="window_style"></property>
459459
</object>
460460
</object>
461461
</object>

0 commit comments

Comments
 (0)