From 718f9ef859e632960ca5f4ee9e564d67a8c6e47e Mon Sep 17 00:00:00 2001 From: Grange Nagy Date: Sun, 3 Dec 2023 02:18:51 -0500 Subject: [PATCH] allow fit drag bmp to be smaller --- gui/builtinShipBrowser/fitItem.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gui/builtinShipBrowser/fitItem.py b/gui/builtinShipBrowser/fitItem.py index 272b65044..d518b1aff 100644 --- a/gui/builtinShipBrowser/fitItem.py +++ b/gui/builtinShipBrowser/fitItem.py @@ -418,10 +418,11 @@ class FitItem(SFItem.SFBrowserItem): if self.dragMotionTrigger < 0: if not self.dragTLFBmp: tdc = wx.MemoryDC() - self.dragTLFBmp = wx.Bitmap(200, self.GetRect().height) + bmpWidth = self.toolbarx if self.toolbarx < 200 else 200 + self.dragTLFBmp = wx.Bitmap(bmpWidth, self.GetRect().height) tdc.SelectObject(self.dragTLFBmp) tdc.SetBrush(wx.Brush(wx.SystemSettings.GetColour(wx.SYS_COLOUR_WINDOW))) - tdc.DrawRectangle(0, 0, 200, self.GetRect().height) + tdc.DrawRectangle(0, 0, bmpWidth, self.GetRect().height) self.DrawItem(tdc) if not self.HasCapture(): self.CaptureMouse()