Merge pull request #389 from Stoope/fix-title-module-max
convert title.max parameter to int
This commit is contained in:
commit
4e854832aa
1 changed files with 3 additions and 2 deletions
|
@ -47,10 +47,11 @@ class Module(bumblebee.engine.Module):
|
|||
return self.focused_title(widget)
|
||||
|
||||
def focused_title(self, widget):
|
||||
title = self._full_title[0:self.parameter("max", 64)]
|
||||
max = int(self.parameter("max", 64))
|
||||
title = self._full_title[0:max]
|
||||
placeholder = self.parameter("placeholder", "...")
|
||||
if title != self._full_title:
|
||||
title = self._full_title[0:self.parameter("max", 64) - len(placeholder)]
|
||||
title = self._full_title[0:max - len(placeholder)]
|
||||
title = "{}{}".format(title, placeholder)
|
||||
|
||||
return title
|
||||
|
|
Loading…
Reference in a new issue