Fixed alignment

This commit is contained in:
Dimitris Zlatanidis 2023-04-10 09:47:02 +03:00
parent 0d1bd210f9
commit 7cb5563718
2 changed files with 3 additions and 2 deletions

View file

@ -4,6 +4,7 @@ Updated:
Fixed:
- For binaries double dependencies
- For remove package version
- Alignment for package name and version
Added:
- Slots '__slots__' to improve speed

View file

@ -71,9 +71,9 @@ class Ascii(Configs):
def draw_view_package(self, package: str, version: str, size: str, color: str, repo: str) -> None:
""" Draw nad print the packages. """
if self.columns <= 80 and len(version) >= 11:
if len(version) >= 11:
version: str = f'{version[:10]}...'
if self.columns <= 80 and len(package) >= 25:
if len(package) >= 25:
package: str = f'{package[:24]}...'
print(f'{self.bgreen}{self.vertical_line} {self.bold}{color}{package}{self.endc}' + ' ' * (30 - len(package)) +
f'{self.bgreen}{version}' + ' ' * ((self.columns - 53) - len(version) - len(size)) +