convert title.max parameter to int
This commit is contained in:
parent
9d9bf0fa8e
commit
c5c0fc40b6
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