Skip to content

Commit 36ba660

Browse files
committed
Looking glass: Fix log text colors.
Use theme-coordinated colors instead of hardcoding. Fixes #11791.
1 parent 5198900 commit 36ba660

File tree

1 file changed

+6
-5
lines changed
  • files/usr/share/cinnamon/cinnamon-looking-glass

1 file changed

+6
-5
lines changed

files/usr/share/cinnamon/cinnamon-looking-glass/page_log.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/python3
22

33
import datetime
4-
from gi.repository import Gtk
4+
from gi.repository import Gtk, Pango
55
import pageutils
66

77
class LogEntry:
@@ -32,22 +32,23 @@ def __init__(self, proxy):
3232
self.added_messages = 0
3333
self.first_message_time = None
3434

35+
context = self.get_style_context()
36+
3537
self.enabled_types = {'info': True, 'warning': True, 'error': True, 'trace': False}
3638
self.type_tags = {
3739
'info': self.textbuffer.create_tag("info",
38-
foreground="#1a6f18",
3940
invisible=not self.enabled_types["info"],
4041
invisible_set=True),
4142
'warning': self.textbuffer.create_tag("warning",
42-
foreground="#c8bf33",
43+
foreground_rgba=context.lookup_color("warning_color")[1],
4344
invisible=not self.enabled_types["warning"],
4445
invisible_set=True),
4546
'error': self.textbuffer.create_tag("error",
46-
foreground="#9f1313",
47+
foreground_rgba=context.lookup_color("error_color")[1],
4748
invisible=not self.enabled_types["error"],
4849
invisible_set=True),
4950
'trace': self.textbuffer.create_tag("trace",
50-
foreground="#18186f",
51+
weight=Pango.Weight.SEMIBOLD,
5152
invisible=not self.enabled_types["trace"],
5253
invisible_set=True)
5354
}

0 commit comments

Comments
 (0)