Skip to content

Commit

Permalink
plugin installer: split the description tooltip into multiple lines a…
Browse files Browse the repository at this point in the history
…s needed

some plugins have so long descriptions, a single line tooltip doesn't fit
 on my 1366px screen. Would be even worse on mobile devices if they had
 the notion of mouse over tooltips. :I Example: MultiEdit
  • Loading branch information
lynxlynxlynx committed Jun 24, 2012
1 parent 3107512 commit 7d469db
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion python/plugins/plugin_installer/installer_gui.py
Expand Up @@ -485,7 +485,16 @@ def addItem(p):
a.setText(2,ver)
a.setToolTip(2,verTip)
a.setText(3,desc)
a.setToolTip(3,descTip)
# split the tooltip into multiple lines when they are too long
tmp = ""
splitTip = ""
for word in descTip.split(" "):
if len(tmp + word) < 80:
tmp = tmp + " " + word
else:
splitTip += tmp + "\n"
tmp = word
a.setToolTip(3, splitTip+tmp)
a.setText(4,p["author"])
if p["homepage"]:
a.setToolTip(4,p["homepage"])
Expand Down

0 comments on commit 7d469db

Please sign in to comment.