FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

wx: Use integers in more places by QuLogic · Pull Request #19395 · matplotlib/matplotlib · GitHub

Repository navigation

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .py  (1) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
5 changes: 3 additions & 2 deletions lib/matplotlib/backends/backend_wx.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -297,10 +297,11 @@ def get_wx_font(self, s, prop):
font = self.fontd.get(key)
if font is not None:
return font
size = self.points_to_pixels(prop.get_size_in_points())
# Font colour is determined by the active wx.Pen
# TODO: It may be wise to cache font information
self.fontd[key] = font = wx.Font( # Cache the font and gc.
pointSize=self.points_to_pixels(prop.get_size_in_points()),
pointSize=int(size + 0.5),
family=self.fontnames.get(prop.get_name(), wx.ROMAN),
style=self.fontangles[prop.get_style()],
weight=self.fontweights[prop.get_weight()])
Expand Down Expand Up @@ -567,7 +568,7 @@ def start_event_loop(self, timeout=0):
raise RuntimeError("Event loop already running")
timer = wx.Timer(self, id=wx.ID_ANY)
if timeout > 0:
timer.Start(timeout * 1000, oneShot=True)
timer.Start(int(timeout * 1000), oneShot=True)
self.Bind(wx.EVT_TIMER, self.stop_event_loop, id=timer.GetId())
# Event loop handler for start/stop event loop
self._event_loop = wx.GUIEventLoop()
Expand Down

Back | FazBrowse Home | New Git URL