From ec12b059d78433df4d1af80a9aefb03bc7ef2cb8 Mon Sep 17 00:00:00 2001 From: Kevin Schlosser Date: Mon, 11 Jan 2021 14:03:42 -0700 Subject: [PATCH] Fixes transparency in the docking guides for wx.lib.agw.aui wx.Region no longer selects all non transparent pixels when a wxBitmap is passed to the constructor. In order to get the region made properly a color bust also be supplied. As luck would have it the way the docking guide images were made we are able to do this because there is only a single color that we needed to use. --- wx/lib/agw/aui/framemanager.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/wx/lib/agw/aui/framemanager.py b/wx/lib/agw/aui/framemanager.py index a3f2e431..44910ba5 100644 --- a/wx/lib/agw/aui/framemanager.py +++ b/wx/lib/agw/aui/framemanager.py @@ -2153,7 +2153,8 @@ class AuiSingleDockingGuide(AuiDockingGuide): useAero = (useWhidbey and [2] or [1])[0] bmp, dummy = GetDockingImage(self._direction, useAero, False) - region = wx.Region(bmp) + region = wx.Region(bmp, wx.Colour(0, 0, 0, 0)) + self.region = region def AeroMove(self, pos): @@ -2340,7 +2341,7 @@ class AuiCenterDockingGuide(AuiDockingGuide): elif useAero: self._aeroBmp = aero_dock_pane.GetBitmap() - region = wx.Region(self._aeroBmp) + region = wx.Region(self._aeroBmp, wx.Colour(0, 0, 0, 0)) self._allAeroBmps = [aero_dock_pane_left.GetBitmap(), aero_dock_pane_top.GetBitmap(), aero_dock_pane_right.GetBitmap(), aero_dock_pane_bottom.GetBitmap(), @@ -2352,7 +2353,7 @@ class AuiCenterDockingGuide(AuiDockingGuide): elif useWhidbey: self._aeroBmp = whidbey_dock_pane.GetBitmap() - region = wx.Region(self._aeroBmp) + region = wx.Region(self._aeroBmp, wx.Colour(0, 0, 0, 0)) self._allAeroBmps = [whidbey_dock_pane_left.GetBitmap(), whidbey_dock_pane_top.GetBitmap(), whidbey_dock_pane_right.GetBitmap(), whidbey_dock_pane_bottom.GetBitmap(),