summaryrefslogtreecommitdiff
path: root/lib/gui/warnings.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gui/warnings.py')
-rw-r--r--lib/gui/warnings.py28
1 files changed, 28 insertions, 0 deletions
diff --git a/lib/gui/warnings.py b/lib/gui/warnings.py
new file mode 100644
index 00000000..48788652
--- /dev/null
+++ b/lib/gui/warnings.py
@@ -0,0 +1,28 @@
+# Authors: see git history
+#
+# Copyright (c) 2021 Authors
+# Licensed under the GNU GPL version 3.0 or later. See the file LICENSE for details.
+
+import wx
+
+from ..i18n import _
+
+
+class WarningPanel(wx.Panel):
+ """A wx.Panel for to display warnings.
+ """
+
+ def __init__(self, parent, *args, **kwargs):
+ wx.Panel.__init__(self, parent, wx.ID_ANY, *args, **kwargs)
+
+ self.warning_box = wx.StaticBox(self, wx.ID_ANY)
+
+ self.warning = wx.StaticText(self)
+ self.warning.SetLabel(_("Cannot load simulator.\nClose Params to get full error message."))
+ self.warning.SetForegroundColour(wx.Colour(255, 25, 25))
+
+ warning_sizer = wx.StaticBoxSizer(self.warning_box, wx.HORIZONTAL)
+ warning_sizer.Add(self.warning, 1, wx.LEFT | wx.BOTTOM | wx.EXPAND, 10)
+
+ self.SetSizerAndFit(warning_sizer)
+ self.Layout()