Skip to content

Commit 023e2ea

Browse files
supascooopaneiljp
authored andcommitted
buttons/ui_sizes: Add prefix symbols to narrowing buttons in top-left.
This commit adds prefix symbols to the main buttons in the top left corner of the UI. This aims to make the main buttons stand out more and approximate the designs used in the web app. This change also leads to a cleaner design, since these top buttons are now indented and aligned similarly to the panels beneath them, eg. the list of streams. The symbol used as a prefix in headers of direct messages is reused for the 'Direct messages' button, with other buttons using symbols added in the previous commit. The left part of the UI is increased in width to accommodate the new additions. Note that the "title" style is used to make the icons bolder, though this should be decoupled in future.
1 parent 99f3bdd commit 023e2ea

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

zulipterminal/config/ui_sizes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"""
44

55
TAB_WIDTH = 3
6-
LEFT_WIDTH = 29
6+
LEFT_WIDTH = 31
77
RIGHT_WIDTH = 23
88

99
# These affect popup width-scaling, dependent upon window width

zulipterminal/ui_tools/buttons.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,14 @@
1313
from zulipterminal.api_types import RESOLVED_TOPIC_PREFIX, EditPropagateMode, Message
1414
from zulipterminal.config.keys import is_command_key, primary_key_for_command
1515
from zulipterminal.config.regexes import REGEX_INTERNAL_LINK_STREAM_ID
16-
from zulipterminal.config.symbols import CHECK_MARK, MUTE_MARKER
16+
from zulipterminal.config.symbols import (
17+
ALL_MESSAGES_MARKER,
18+
CHECK_MARK,
19+
DIRECT_MESSAGE_MARKER,
20+
MENTIONED_MESSAGES_MARKER,
21+
MUTE_MARKER,
22+
STARRED_MESSAGES_MARKER,
23+
)
1724
from zulipterminal.config.ui_mappings import EDIT_MODE_CAPTIONS, STREAM_ACCESS_TYPE
1825
from zulipterminal.helper import StreamData, hash_util_decode, process_media
1926
from zulipterminal.urwid_types import urwid_MarkupTuple, urwid_Size
@@ -122,6 +129,7 @@ def __init__(self, *, controller: Any, count: int) -> None:
122129

123130
super().__init__(
124131
controller=controller,
132+
prefix_markup=("title", ALL_MESSAGES_MARKER),
125133
label_markup=(None, button_text),
126134
suffix_markup=("unread_count", ""),
127135
show_function=controller.narrow_to_all_messages,
@@ -136,6 +144,7 @@ def __init__(self, *, controller: Any, count: int) -> None:
136144
super().__init__(
137145
controller=controller,
138146
label_markup=(None, button_text),
147+
prefix_markup=("title", DIRECT_MESSAGE_MARKER),
139148
suffix_markup=("unread_count", ""),
140149
show_function=controller.narrow_to_all_pm,
141150
count=count,
@@ -148,6 +157,7 @@ def __init__(self, *, controller: Any, count: int) -> None:
148157

149158
super().__init__(
150159
controller=controller,
160+
prefix_markup=("title", MENTIONED_MESSAGES_MARKER),
151161
label_markup=(None, button_text),
152162
suffix_markup=("unread_count", ""),
153163
show_function=controller.narrow_to_all_mentions,
@@ -161,6 +171,7 @@ def __init__(self, *, controller: Any, count: int) -> None:
161171

162172
super().__init__(
163173
controller=controller,
174+
prefix_markup=("title", STARRED_MESSAGES_MARKER),
164175
label_markup=(None, button_text),
165176
suffix_markup=("starred_count", ""),
166177
show_function=controller.narrow_to_all_starred,

0 commit comments

Comments
 (0)