job_status: animated label compute max characters
This commit is contained in:
parent
032638e027
commit
72413544c8
@ -837,14 +837,13 @@ class JobStatusPanel(ScreenPanel):
|
||||
"complete": self.labels['file'].get_label(),
|
||||
"current": self.labels['file'].get_label(),
|
||||
"position": 0,
|
||||
"limit": 24,
|
||||
"limit": 0.8 * (self._gtk.get_content_width() - self.labels[
|
||||
'darea'].get_allocated_width()) // self._gtk.get_font_size(),
|
||||
"length": len(self.labels['file'].get_label())
|
||||
}
|
||||
|
||||
if self.animation_timeout is None:
|
||||
# if self.labels['file'].is_ellipsized(): <- currently this doesn't work
|
||||
if (self.filename_label['length'] - self.filename_label['limit']) > 0:
|
||||
self.animation_timeout = GLib.timeout_add_seconds(1, self.animate_label)
|
||||
if self.animation_timeout is None and (self.filename_label['length'] - self.filename_label['limit']) > 0:
|
||||
self.animation_timeout = GLib.timeout_add_seconds(1, self.animate_label)
|
||||
self.update_percent_complete()
|
||||
self.update_file_metadata()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user