mirror of
https://github.com/paul-nameless/tg
synced 2024-11-25 13:20:25 +00:00
Made selection bold and underlined instead of reverse colour #263
This commit is contained in:
parent
2b0c0cf199
commit
6e2176b48d
1 changed files with 5 additions and 5 deletions
10
tg/views.py
10
tg/views.py
|
@ -6,7 +6,7 @@ from typing import Any, Dict, List, Optional, Tuple, Union, cast
|
|||
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
|
||||
|
@ -173,13 +173,13 @@ class ChatView:
|
|||
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(
|
||||
|
@ -192,7 +192,7 @@ class ChatView:
|
|||
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(
|
||||
|
@ -593,7 +593,7 @@ class MsgView:
|
|||
)
|
||||
|
||||
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:
|
||||
|
|
Loading…
Reference in a new issue