add margins, and limit title lengths
This commit is contained in:
parent
ff0f2bd335
commit
5e24320bca
1 changed files with 3 additions and 1 deletions
|
@ -176,9 +176,11 @@ def focus_next_stacked(data, forward=1):
|
||||||
if client and (client.desktop() == desktop and \
|
if client and (client.desktop() == desktop and \
|
||||||
client.normal()):
|
client.normal()):
|
||||||
t = client.title()
|
t = client.title()
|
||||||
|
if len(t) > 50: # limit the length of titles
|
||||||
|
t = t[:24] + "..." + t[-24:]
|
||||||
titles.append(t)
|
titles.append(t)
|
||||||
_list_windows.append(c)
|
_list_windows.append(c)
|
||||||
l = font.measureString(t)
|
l = font.measureString(t) + 10 # add margin
|
||||||
if l > longest: longest = l
|
if l > longest: longest = l
|
||||||
if len(titles):
|
if len(titles):
|
||||||
for t in titles:
|
for t in titles:
|
||||||
|
|
Loading…
Reference in a new issue