mirror of
https://github.com/rr-/pq-cli.git
synced 2026-09-29 06:44:00 -06:00
ui/curses: add swords to logo
This commit is contained in:
@@ -12,6 +12,7 @@ from pqcli.roster import Roster
|
||||
from pqcli.ui.curses.colors import (
|
||||
COLOR_FOCUSED,
|
||||
COLOR_LOGO,
|
||||
COLOR_LOGO_ALT,
|
||||
COLOR_PROGRESSBAR,
|
||||
COLOR_SCROLLBAR_THUMB,
|
||||
COLOR_SCROLLBAR_TRACK,
|
||||
@@ -51,7 +52,8 @@ class CursesUserInterface(BaseUserInterface):
|
||||
if has_colors():
|
||||
curses.start_color()
|
||||
curses.use_default_colors()
|
||||
curses.init_pair(COLOR_LOGO, 10, -1)
|
||||
curses.init_pair(COLOR_LOGO, -1, -1)
|
||||
curses.init_pair(COLOR_LOGO_ALT, -1, 9)
|
||||
curses.init_pair(COLOR_FOCUSED, -1, 8)
|
||||
curses.init_pair(COLOR_SCROLLBAR_THUMB, -1, 7)
|
||||
curses.init_pair(COLOR_SCROLLBAR_TRACK, -1, 0)
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
_HAS_COLORS = False
|
||||
|
||||
COLOR_LOGO = 1
|
||||
COLOR_FOCUSED = 2
|
||||
COLOR_SCROLLBAR_TRACK = 3
|
||||
COLOR_SCROLLBAR_THUMB = 4
|
||||
COLOR_PROGRESSBAR = 5
|
||||
COLOR_LOGO_ALT = 2
|
||||
COLOR_FOCUSED = 3
|
||||
COLOR_SCROLLBAR_TRACK = 4
|
||||
COLOR_SCROLLBAR_THUMB = 5
|
||||
COLOR_PROGRESSBAR = 6
|
||||
|
||||
|
||||
def has_colors() -> bool:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import curses
|
||||
import typing as T
|
||||
|
||||
from pqcli.ui.curses.colors import COLOR_LOGO, has_colors
|
||||
from pqcli.ui.curses.colors import COLOR_LOGO, COLOR_LOGO_ALT, has_colors
|
||||
from pqcli.ui.curses.event_handler import EventHandler
|
||||
from pqcli.ui.curses.util import KEYS_CANCEL, Choice
|
||||
from pqcli.ui.curses.widgets import Menu
|
||||
@@ -9,11 +9,22 @@ from pqcli.ui.curses.widgets import Menu
|
||||
from .base_view import BaseView
|
||||
|
||||
LOGO = """
|
||||
█▀▀▄ ▄▀▀█
|
||||
▀▄ ▀▄ ▄▀ ▄▀
|
||||
▀▄ ▀▄ ▄▀ ▄▀
|
||||
▀▄ ▄▀ ▄▀
|
||||
▄▀ ▄▀▄
|
||||
▄▄▄▄▀ ▄▀▄ ▀▄▄▄▄
|
||||
▀▄ █▄▄▀ ▀▄▄█ ▄▀
|
||||
▄▀█▄ █ █ ▄█▀▄
|
||||
▄▄▀▄▀ ▀▀ ▀▀ ▀▄▀▄▄
|
||||
█▄█ █▄█
|
||||
|
||||
█▀▀▄ ▄▀▀▄ █
|
||||
█▄▄▀ █▀▀ ▄▀▀▄ ▄▀▀▄ █▀▀ ▄▀▀▄ ▄▀▀▀ ▄▀▀▀ █ █ █ █ ▄▀▀▄ ▄▀▀▀ ▀█▀
|
||||
█ █ █ █ ▀▄▄█ █ █▀▀ ▀▀▄ ▀▀▄ █ ▌█ █ █ █▀▀ ▀▀▄ █
|
||||
▀ ▀ ▀▀ ▄▄▀ ▀ ▀▀ ▀▀▀ ▀▀▀ ▀▀▌ ▀▀ ▀▀ ▀▀▀ ▀
|
||||
""".strip()
|
||||
""".strip("\n")
|
||||
|
||||
|
||||
class MainMenu(Menu):
|
||||
@@ -30,6 +41,12 @@ class MainMenu(Menu):
|
||||
if has_colors():
|
||||
for y in range(len(self._header_lines)):
|
||||
self._pad.chgat(y, 0, curses.color_pair(COLOR_LOGO))
|
||||
self._pad.chgat(3, 29, 5, curses.color_pair(COLOR_LOGO_ALT))
|
||||
self._pad.chgat(4, 29, 5, curses.color_pair(COLOR_LOGO_ALT))
|
||||
self._pad.chgat(5, 32, 4, curses.color_pair(COLOR_LOGO_ALT))
|
||||
self._pad.chgat(5, 27, 4, curses.color_pair(COLOR_LOGO_ALT))
|
||||
self._pad.chgat(6, 34, 2, curses.color_pair(COLOR_LOGO_ALT))
|
||||
self._pad.chgat(6, 27, 2, curses.color_pair(COLOR_LOGO_ALT))
|
||||
|
||||
|
||||
class RosterView(BaseView):
|
||||
|
||||
Reference in New Issue
Block a user