Commit efa93de7 authored by Paul McCarthy's avatar Paul McCarthy 🚵
Browse files

MNT: Update usage of wxversion

parent 50e5773b
......@@ -47,7 +47,7 @@ class ColourButton(wx.Button):
# Under wxPython-phoenix, setting
# label='' results in "Button".
if fw.wxversion() == fw.WX_PHOENIX:
if fw.wxFlavour() == fw.WX_PHOENIX:
self.SetLabel(' ')
self.__size = size
......@@ -94,7 +94,7 @@ class ColourButton(wx.Button):
data[:, :] = colour
if fw.wxversion() == fw.WX_PHOENIX:
if fw.wxFlavour() == fw.WX_PHOENIX:
self.__bmp = wx.Bitmap.FromBufferRGBA(w, h, data)
else:
self.__bmp = wx.BitmapFromBufferRGBA( w, h, data)
......
......@@ -460,7 +460,7 @@ class TextEditDialog(wx.Dialog):
icon = wx.ArtProvider.GetMessageBoxIcon(icon)
if fw.wxversion() == fw.WX_PHOENIX:
if fw.wxFlavour() == fw.WX_PHOENIX:
bmp = wx.Bitmap()
else:
bmp = wx.EmptyBitmap(icon.GetWidth(), icon.GetHeight())
......@@ -674,7 +674,7 @@ class FSLDirDialog(wx.Dialog):
icon = wx.ArtProvider.GetMessageBoxIcon(wx.ICON_EXCLAMATION)
if fw.wxversion() == fw.WX_PHOENIX:
if fw.wxFlavour() == fw.WX_PHOENIX:
bmp = wx.Bitmap()
else:
bmp = wx.EmptyBitmap(icon.GetWidth(), icon.GetHeight())
......@@ -844,7 +844,7 @@ class CheckBoxMessageDialog(wx.Dialog):
icon = wx.ArtProvider.GetMessageBoxIcon(icon)
self.__icon = wx.StaticBitmap(self)
if fw.wxversion() == fw.WX_PHOENIX:
if fw.wxFlavour() == fw.WX_PHOENIX:
bmp = wx.Bitmap()
else:
bmp = wx.EmptyBitmap(icon.GetWidth(), icon.GetHeight())
......
......@@ -22,7 +22,7 @@ import fsleyes_widgets as fw
log = logging.getLogger(__name__)
if fw.wxversion() == fw.WX_PHOENIX: FloatSpinBase = wx.Panel
if fw.wxFlavour() == fw.WX_PHOENIX: FloatSpinBase = wx.Panel
else: FloatSpinBase = wx.PyPanel
......
......@@ -14,7 +14,7 @@ import wx
import fsleyes_widgets as fw
if fw.wxversion() == fw.WX_PHOENIX: TextPanelBase = wx.Panel
if fw.wxFlavour() == fw.WX_PHOENIX: TextPanelBase = wx.Panel
else: TextPanelBase = wx.PyPanel
......
......@@ -112,7 +112,7 @@ def wxversion():
"""Deprecated - use ``wxFlavour``instead. """
warnings.warn('wxversion is deprecated - use wxFlavour instead.',
category=DeprecationWarning,
stacklevel=1)
stacklevel=2)
return wxFlavour()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment