[PATCH 6 of 8 DarkThemeSeries 2] csinfo: theme branch/tag/obsolete chips for dark mode

0 views
Skip to first unread message

Peter Demcak

unread,
Mar 6, 2026, 2:42:01 PM (4 days ago) Mar 6
to thg...@googlegroups.com
# HG changeset patch
# User Peter Demcak <majs...@gmail.com>
# Date 1772737237 -3600
# Thu Mar 05 20:00:37 2026 +0100
# Node ID fe0d0fb5e8462d558b7a229c8ba44f92353afb0e
# Parent 99378c9ae403a939e65c483d15400bb8dce9cd07
csinfo: theme branch/tag/obsolete chips for dark mode

- Replace hardcoded chip colors in csinfo panel with theme-aware colors:
branch/rawbranch, tags, obsolete states

diff -r 99378c9ae403 -r fe0d0fb5e846 tortoisehg/hgqt/csinfo.py
--- a/tortoisehg/hgqt/csinfo.py Thu Mar 05 20:00:14 2026 +0100
+++ b/tortoisehg/hgqt/csinfo.py Thu Mar 05 20:00:37 2026 +0100
@@ -31,6 +31,8 @@
from ..util.i18n import _
from . import qtlib

+from .theme import THEME
+
PANEL_DEFAULT = ('rev', 'summary', 'user', 'dateage', 'branch', 'close',
'topic', 'tags', 'graft', 'transplant', 'obsolete',
'p4', 'svn', 'converted',)
@@ -316,6 +318,11 @@
return value
elif item in ('rawbranch', 'branch'):
opts = dict(fg='black', bg='#aaffaa')
+ if THEME.enabled:
+ opts = dict(
+ fg=THEME.chip_text.name(),
+ bg=THEME.chip_branch_background.name(),
+ )
return qtlib.markup(' %s ' % value, **opts)
elif item == 'topic':
opts = {
@@ -325,6 +332,11 @@
return qtlib.markup(' %s ' % value, **opts)
elif item == 'tags':
opts = dict(fg='black', bg='#ffffaa')
+ if THEME.enabled:
+ opts = dict(
+ fg=THEME.chip_text.name(),
+ bg=THEME.chip_tag_background.name(),
+ )
tags = [qtlib.markup(' %s ' % tag, **opts) for tag in value]
return ' '.join(tags)
elif item in ('desc', 'summary', 'user', 'shortuser',
@@ -334,6 +346,11 @@
return qtlib.markup('%s (%s)' % value)
elif item == 'obsolete':
opts = dict(fg='black', bg='#ff8566')
+ if THEME.enabled:
+ opts = dict(
+ fg=THEME.error_text.name(),
+ bg=THEME.error_background.name()
+ )
obsoletestates = [qtlib.markup(' %s ' % state, **opts)
for state in value]
return ' '.join(obsoletestates)

Reply all
Reply to author
Forward
0 new messages