Permalink
Browse files

Multi line tooltips. Add '\n'

git-svn-id: http://svn.unknown-horizons.org/trunk@2501 d3468d7a-13f2-4ea4-bf00-366cb6352a40
  • Loading branch information...
greyghost
greyghost committed Jul 22, 2009
1 parent 6036619 commit a9ce52ae79481060c34eb5c8a288954c8c9436cd
Showing with 2 additions and 2 deletions.
  1. +2 −2 horizons/gui/widgets/tooltip.py
@@ -40,7 +40,7 @@ def __init__(self, **kwargs):
def show_tooltip(self):
if hasattr(self, 'tooltip'):
self.label = self.gui.findChild(name='tooltip')
- self.label.text = self.tooltip
+ self.label.text = self.tooltip.replace(r'\n', '\n')
self.gui.position = (self._getParent().position[0] + self.position[0], self._getParent().position[1] + self._getParent().size[1])
self.gui.show()
else:
@@ -65,7 +65,7 @@ def __init__(self, **kwargs):
def show_tooltip(self):
if hasattr(self, 'tooltip'):
self.label = self.gui.findChild(name='tooltip')
- self.label.text = self.tooltip
+ self.label.text = self.tooltip.replace(r'\n', '\n')
self.gui.position = (self._getParent().position[0] + self.position[0], self._getParent().position[1] + self.position[1] + self.size[1] + 15)
self.gui.show()
else:

0 comments on commit a9ce52a

Please sign in to comment.