Skip to content

Commit

Permalink
Made selection bold and underlined instead of reverse colour paul-nam…
Browse files Browse the repository at this point in the history
  • Loading branch information
proycon committed Dec 13, 2022
1 parent 2b0c0cf commit 6e2176b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tg/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from _curses import window # type: ignore

from tg import config
from tg.colors import bold, cyan, get_color, magenta, reverse, white, yellow
from tg.colors import bold, cyan, get_color, magenta, reverse, underline, white, yellow
from tg.models import Model, UserModel
from tg.msg import MsgProxy
from tg.tdlib import ChatType, get_chat_type, is_group
Expand Down Expand Up @@ -173,13 +173,13 @@ def resize(self, rows: int, cols: int, width: int) -> None:
def _msg_color(self, is_selected: bool = False) -> int:
color = get_color(white, -1)
if is_selected:
return color | reverse
return color | underline | bold
return color

def _unread_color(self, is_selected: bool = False) -> int:
color = get_color(magenta, -1)
if is_selected:
return color | reverse
return color | underline | bold
return color

def _chat_attributes(
Expand All @@ -192,7 +192,7 @@ def _chat_attributes(
self._msg_color(is_selected),
)
if is_selected:
return tuple(attr | reverse for attr in attrs)
return tuple(attr | underline | bold for attr in attrs)
return attrs

def draw(
Expand Down Expand Up @@ -593,7 +593,7 @@ def _msg_attributes(self, is_selected: bool, user: str) -> Tuple[int, ...]:
)

if is_selected:
return tuple(attr | reverse for attr in attrs)
return tuple(attr | underline | bold for attr in attrs)
return attrs

def _parse_msg(self, msg: MsgProxy) -> str:
Expand Down

0 comments on commit 6e2176b

Please sign in to comment.