summary refs log tree commit diff
path: root/resources
diff options
context:
space:
mode:
authorredsky17 <joedonofry@gmail.com>2019-01-18 17:17:25 +0000
committerredsky17 <joedonofry@gmail.com>2019-01-18 17:17:25 +0000
commit50e382f554aee2bd12d8cd457b7e17b917162e6d (patch)
tree3c49c92f9a68e3cc6e5fe8c835c576a614e5c3f4 /resources
parentMake the author text slightly large. (diff)
downloadnheko-50e382f554aee2bd12d8cd457b7e17b917162e6d.tar.xz
Modified the code that generates user's colors so that it will
work regardless of the theme choices the user makes.  The code
now incorporates the contrast between the background color and the
color generated by the user_name when picking colors.  It currently
has two 'big' issues:
1. Colors are not cached.  I am planning on adding a QHash for this
a little later.  This should improve performance by not calculating
the color for the same users over and over and over again.
2. Theme changes do not trigger the colors to get refreshed.
Currently, you will have to switch to a different room and back
to get the colors to refresh.
Diffstat (limited to 'resources')
-rw-r--r--resources/styles/nheko-dark.qss4
-rw-r--r--resources/styles/nheko.qss4
-rw-r--r--resources/styles/system.qss4
3 files changed, 12 insertions, 0 deletions
diff --git a/resources/styles/nheko-dark.qss b/resources/styles/nheko-dark.qss

index 86056bb2..e81fa0b8 100644 --- a/resources/styles/nheko-dark.qss +++ b/resources/styles/nheko-dark.qss
@@ -3,6 +3,10 @@ QLabel { color: #caccd1; } +TimelineItem { + qproperty-backgroundColor: #202228; +} + #chatPage, #chatPage > * { background-color: #202228; diff --git a/resources/styles/nheko.qss b/resources/styles/nheko.qss
index ca5a8f0d..468ae0f1 100644 --- a/resources/styles/nheko.qss +++ b/resources/styles/nheko.qss
@@ -3,6 +3,10 @@ QLabel { color: #333; } +TimelineItem { + qproperty-backgroundColor: white; +} + #chatPage, #chatPage > * { background-color: white; diff --git a/resources/styles/system.qss b/resources/styles/system.qss
index 45263e96..6663ee6b 100644 --- a/resources/styles/system.qss +++ b/resources/styles/system.qss
@@ -3,6 +3,10 @@ TypingDisplay { qproperty-backgroundColor: palette(window); } +TimelineItem { + qproperty-backgroundColor: palette(window); +} + TimelineView, TimelineView > * { border: none;