mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2025-12-16 01:30:07 +01:00
Merge pull request #881 from tianzhuqiao/agw_aui_4.0.x
Always reset floating size and style when floating a toolbar in agw.aui.
(cherry picked from commit 4ab2ea6833)
This commit is contained in:
@@ -164,6 +164,7 @@ Changes in this release include the following:
|
||||
|
||||
* Fixed the stock labels to conform to Windows design guidelines. (#787)
|
||||
|
||||
* Always reset floating size and style when floating a toolbar in agw.aui. (#880)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -6444,6 +6444,18 @@ class AuiManager(wx.EvtHandler):
|
||||
pFrame = p.frame
|
||||
|
||||
if p.IsFloating():
|
||||
if p.IsToolbar():
|
||||
bar = p.window
|
||||
if isinstance(bar, auibar.AuiToolBar):
|
||||
bar.SetGripperVisible(False)
|
||||
agwStyle = bar.GetAGWWindowStyleFlag()
|
||||
bar.SetAGWWindowStyleFlag(agwStyle & ~AUI_TB_VERTICAL)
|
||||
bar.Realize()
|
||||
|
||||
s = p.window.GetMinSize()
|
||||
p.BestSize(s)
|
||||
p.FloatingSize(wx.DefaultSize)
|
||||
|
||||
if pFrame is None:
|
||||
# we need to create a frame for this
|
||||
# pane, which has recently been floated
|
||||
@@ -6456,18 +6468,6 @@ class AuiManager(wx.EvtHandler):
|
||||
self._agwFlags & AUI_MGR_TRANSPARENT_DRAG:
|
||||
frame.SetTransparent(150)
|
||||
|
||||
if p.IsToolbar():
|
||||
bar = p.window
|
||||
if isinstance(bar, auibar.AuiToolBar):
|
||||
bar.SetGripperVisible(False)
|
||||
agwStyle = bar.GetAGWWindowStyleFlag()
|
||||
bar.SetAGWWindowStyleFlag(agwStyle & ~AUI_TB_VERTICAL)
|
||||
bar.Realize()
|
||||
|
||||
s = p.window.GetMinSize()
|
||||
p.BestSize(s)
|
||||
p.FloatingSize(wx.DefaultSize)
|
||||
|
||||
frame.SetPaneWindow(p)
|
||||
p.needsTransparency = True
|
||||
p.frame = pFrame = frame
|
||||
|
||||
Reference in New Issue
Block a user