🌐 AI搜索 & 代理 主页
Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions lib/matplotlib/backends/backend_wx.py
Original file line number Diff line number Diff line change
Expand Up @@ -1105,7 +1105,7 @@ def _set_frame_icon(frame):


class NavigationToolbar2Wx(NavigationToolbar2, wx.ToolBar):
def __init__(self, canvas):
def __init__(self, canvas, coordinates=True):
wx.ToolBar.__init__(self, canvas.GetParent(), -1)

if 'wxMac' in wx.PlatformInfo:
Expand All @@ -1127,9 +1127,11 @@ def __init__(self, canvas):
self.Bind(wx.EVT_TOOL, getattr(self, callback),
id=self.wx_ids[text])

self.AddStretchableSpace()
self._label_text = wx.StaticText(self)
self.AddControl(self._label_text)
self._coordinates = coordinates
if self._coordinates:
self.AddStretchableSpace()
self._label_text = wx.StaticText(self)
self.AddControl(self._label_text)

self.Realize()

Expand Down Expand Up @@ -1334,7 +1336,8 @@ def statbar(self):
return self.GetTopLevelParent().GetStatusBar()

def set_message(self, s):
self._label_text.SetLabel(s)
if self._coordinates:
self._label_text.SetLabel(s)

def set_history_buttons(self):
can_backward = self._nav_stack._pos > 0
Expand Down