Adjusted unread message styling. Remapped QR-code shortcut to ctrl-p (ctrl-q conflicts with quit shortcut).

master
Mark Qvist 2026-05-21 02:10:10 +02:00
parent 45c031d343
commit 0222714f48
3 changed files with 31 additions and 17 deletions

View File

@ -37,6 +37,8 @@ THEMES = {
("msg_header_delivered", "black", "light blue", "standout", "#111", "#28b"),
("msg_header_failed", "black", "dark gray", "standout", "#000", "#777"),
("msg_warning_untrusted", "black", "dark red", "standout", "#111", "dark red"),
("msg_notice_unread", "light blue", "default", "standout", "#28b", "default"),
("msg_notice_caution", "yellow", "default", "standout", "#fd3", "default"),
("list_focus", "black", "light gray", "standout", "#111", "#aaa"),
("list_off_focus", "black", "dark gray", "standout", "#111", "#777"),
("list_trusted", "dark green", "default", "default", "#6b2", "default"),
@ -88,6 +90,8 @@ THEMES = {
("msg_header_delivered", "black", "light blue", "standout", "#111", "#28b"),
("msg_header_failed", "black", "dark gray", "standout", "#000", "#777"),
("msg_warning_untrusted", "black", "dark red", "standout", "#111", "dark red"),
("msg_notice_unread", "dark blue", "default", "standout", "#069", "default"),
("msg_notice_caution", "yellow", "default", "standout", "#fd3", "default"),
("list_focus", "black", "dark gray", "standout", "#111", "#aaa"),
("list_off_focus", "black", "dark gray", "standout", "#111", "#777"),
("list_trusted", "dark green", "default", "default", "#4a0", "default"),

View File

@ -92,7 +92,7 @@ class ConversationsArea(urwid.LineBox):
self.delegate.toggle_fullscreen()
elif key == "ctrl o":
self.delegate.toggle_list_sort()
elif key == "ctrl q":
elif key == "ctrl p":
self.delegate.show_my_qr()
elif key == "tab":
self.delegate.app.ui.main_display.frame.focus_position = "header"
@ -1620,7 +1620,7 @@ class ConversationsDisplay():
focus_style = "list_focus"
elif trust_level == DirectoryEntry.TRUSTED:
symbol = g["check"]
style = "body_text"
style = "list_normal"
focus_style = "list_focus"
elif trust_level == DirectoryEntry.WARNING:
symbol = g["warning"]
@ -1651,10 +1651,20 @@ class ConversationsDisplay():
markup = [head]
if failed and source_hash != self.currently_displayed_conversation:
badge_text = " "+g["warning"]+" ("+str(failed)+")"
markup.append(("msg_header_caution", badge_text))
# markup.append(("msg_notice_caution", badge_text))
markup.append(badge_text)
elif unread and source_hash != self.currently_displayed_conversation:
badge_text = " "+g["unread"]+" ("+str(unread)+")"
markup.append(("msg_header_delivered", badge_text))
# Good idea with having the badges here colored, but
# using the bg color for it is a bit much, I think.
# I set fg color attrmap styles, but that messes up
# the bg on list focus. If there's a way to handle
# that, we can re-enable this.
# markup.append(("msg_notice_unread", badge_text))
markup.append(badge_text)
if trust_level == DirectoryEntry.TRUSTED and unread and source_hash != self.currently_displayed_conversation:
style = "msg_notice_unread"
if last_activity > 0:
markup.append("\n "+relative_time(last_activity))

View File

@ -1328,19 +1328,19 @@ With micron you can easily create structured documents and pages with formatting
>Table of Contents
`F00f`_`[A Few Demo Outputs`#a-few-demo-outputs]`_`f
`F00f`_`[Micron Tags`#micron-tags]`_`f
`F00f`_`[High Level Stuff`#high-level-stuff]`_`f
`F00f`_`[Colors`#colors]`_`f
`F00f`_`[Page Foreground and Background Colors`#page-foreground-and-background-colors]`_`f
`F00f`_`[Links`#links]`_`f
`F00f`_`[Anchors`#anchors]`_`f
`F00f`_`[Tables`#tables]`_`f
`F00f`_`[Fields & Requests`#fields-requests]`_`f
`F00f`_`[Comments`#comments]`_`f
`F00f`_`[Partials`#partials]`_`f
`F00f`_`[Literals`#literals]`_`f
`F00f`_`[Closing Remarks`#closing-remarks]`_`f
`F44f`_`[A Few Demo Outputs`#a-few-demo-outputs]`_`f
`F44f`_`[Micron Tags`#micron-tags]`_`f
`F44f`_`[High Level Stuff`#high-level-stuff]`_`f
`F44f`_`[Colors`#colors]`_`f
`F44f`_`[Page Foreground and Background Colors`#page-foreground-and-background-colors]`_`f
`F44f`_`[Links`#links]`_`f
`F44f`_`[Anchors`#anchors]`_`f
`F44f`_`[Tables`#tables]`_`f
`F44f`_`[Fields & Requests`#fields-requests]`_`f
`F44f`_`[Comments`#comments]`_`f
`F44f`_`[Partials`#partials]`_`f
`F44f`_`[Literals`#literals]`_`f
`F44f`_`[Closing Remarks`#closing-remarks]`_`f
>>Recommendations and Requirements