From acb7467daa7a76ba0f7ce901665bb90e7fe3b2ec Mon Sep 17 00:00:00 2001 From: Daniel O'Connor Date: Wed, 17 Jan 2024 00:16:51 +1030 Subject: [PATCH] Tweak column widths and don't use ellipsization to squeeze more info in. --- partselector.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/partselector.py b/partselector.py index daf9d3b..22d0181 100644 --- a/partselector.py +++ b/partselector.py @@ -389,26 +389,26 @@ def __init__(self, parent, parts): self.part_list.AppendTextColumn( "LCSC", mode=wx.dataview.DATAVIEW_CELL_INERT, - width=int(parent.scale_factor * 80), + width=int(parent.scale_factor * 60), align=wx.ALIGN_LEFT, flags=wx.dataview.DATAVIEW_COL_RESIZABLE, - ) + ).GetRenderer().EnableEllipsize(wx.ELLIPSIZE_NONE) self.part_list.AppendTextColumn( "MFR Number", mode=wx.dataview.DATAVIEW_CELL_INERT, width=int(parent.scale_factor * 140), align=wx.ALIGN_LEFT, flags=wx.dataview.DATAVIEW_COL_RESIZABLE, - ) + ).GetRenderer().EnableEllipsize(wx.ELLIPSIZE_NONE) self.part_list.AppendTextColumn( "Package", mode=wx.dataview.DATAVIEW_CELL_INERT, width=int(parent.scale_factor * 100), align=wx.ALIGN_LEFT, flags=wx.dataview.DATAVIEW_COL_RESIZABLE, - ) + ).GetRenderer().EnableEllipsize(wx.ELLIPSIZE_NONE) self.part_list.AppendTextColumn( - "Joints", + "Pins", mode=wx.dataview.DATAVIEW_CELL_INERT, width=int(parent.scale_factor * 40), align=wx.ALIGN_CENTER, @@ -417,38 +417,38 @@ def __init__(self, parent, parts): self.part_list.AppendTextColumn( "Type", mode=wx.dataview.DATAVIEW_CELL_INERT, - width=int(parent.scale_factor * 80), + width=int(parent.scale_factor * 50), align=wx.ALIGN_LEFT, flags=wx.dataview.DATAVIEW_COL_RESIZABLE, - ) + ).GetRenderer().EnableEllipsize(wx.ELLIPSIZE_NONE) self.part_list.AppendTextColumn( "Manufacturer", mode=wx.dataview.DATAVIEW_CELL_INERT, - width=int(parent.scale_factor * 140), + width=int(parent.scale_factor * 100), align=wx.ALIGN_LEFT, flags=wx.dataview.DATAVIEW_COL_RESIZABLE, - ) + ).GetRenderer().EnableEllipsize(wx.ELLIPSIZE_NONE) self.part_list.AppendTextColumn( "Description", mode=wx.dataview.DATAVIEW_CELL_INERT, width=int(parent.scale_factor * 300), align=wx.ALIGN_LEFT, flags=wx.dataview.DATAVIEW_COL_RESIZABLE, - ) + ).GetRenderer().EnableEllipsize(wx.ELLIPSIZE_NONE) self.part_list.AppendTextColumn( "Price", mode=wx.dataview.DATAVIEW_CELL_INERT, width=int(parent.scale_factor * 100), align=wx.ALIGN_LEFT, flags=wx.dataview.DATAVIEW_COL_RESIZABLE, - ) + ).GetRenderer().EnableEllipsize(wx.ELLIPSIZE_NONE) self.part_list.AppendTextColumn( "Stock", mode=wx.dataview.DATAVIEW_CELL_INERT, width=int(parent.scale_factor * 50), align=wx.ALIGN_CENTER, flags=wx.dataview.DATAVIEW_COL_RESIZABLE, - ) + ).GetRenderer().EnableEllipsize(wx.ELLIPSIZE_NONE) self.part_list.SetMinSize(HighResWxSize(parent.window, wx.Size(1050, 500)))