Menu selection highlights now span the entire horizontal length of the terminal for a better appearance.

This commit is contained in:
= 2022-07-10 21:16:25 +05:30
parent 6a9ca25103
commit aad657b76b
1 changed files with 3 additions and 1 deletions

View File

@ -4,6 +4,7 @@
from os import system as exec
from os import listdir, getlogin
from datetime import date
from sys import argv
@ -90,7 +91,8 @@ def menuFunction(menu = [], headerLine = "Use the arrow keys or j,k to make a se
for sno in range(len(imenu)):
if (sno == highlight):
stdscr.addstr(f"\n{((pageLength)*(pageIndex-1)) + (sno+1)} - {imenu[sno]}", curses.A_STANDOUT)
entry = str(((pageLength)*(pageIndex-1)) + (sno+1)) + " - " + imenu[sno]
stdscr.addstr(f"\n{entry}{' '*(sx - len(entry) - 1)}", curses.A_STANDOUT)
else:
stdscr.addstr(f"\n{((pageLength)*(pageIndex-1)) + (sno+1)} - {imenu[sno]}")
sno += 1