Add support for setting author name colors

Review Request #652 — Created May 14, 2021 and submitted

Information

talkatu/talkatu
default
0ed07d3b23c2

Reviewers

Add support for setting author name colors

Ran the demo

Description From Last Updated

It looks like a couple of these _ did not get changed to -, probably when you had to restore …

QuLogicQuLogic

Why the dash?

QuLogicQuLogic

GdkRGBA supports colour names, so the hex-ification was not necessary: In [1]: from gi.repository import Gdk In [2]: col = …

QuLogicQuLogic

Can these settings be changed again after this? I think attributes are merged with existing, so if the colour were …

QuLogicQuLogic

No need for the if.

QuLogicQuLogic
QuLogic
  1. 
      
  2. demo/data/demo.ui (Diff revision 1)
     
     
    Show all issues

    It looks like a couple of these _ did not get changed to -, probably when you had to restore it when Glade forgot it.

  3. demo/data/demo.ui (Diff revision 1)
     
     
    Show all issues

    Why the dash?

    1. English is hard for me? I dunno, will remove :-D

  4. demo/data/demo.ui (Diff revision 1)
     
     
    Show all issues

    GdkRGBA supports colour names, so the hex-ification was not necessary:

    In [1]: from gi.repository import Gdk                                                                                                       
    
    In [2]: col = Gdk.RGBA()                                                                                                                    
    
    In [3]: [(c, col.parse(c), col.to_string()) for c in 'red green blue yellow purple'.split()]                                                
    Out[3]: 
    [('red', True, 'rgb(255,0,0)'),
     ('green', True, 'rgb(0,128,0)'),
     ('blue', True, 'rgb(0,0,255)'),
     ('yellow', True, 'rgb(255,255,0)'),
     ('purple', True, 'rgb(128,0,128)')]
    

    though green is slightly different.

    1. Good call, and that green is probably better than the neon green :-D

  5. talkatu/talkatuhistoryrow.c (Diff revision 1)
     
     
     
     
     
     
     
     
    Show all issues

    Can these settings be changed again after this? I think attributes are merged with existing, so if the colour were removed, this would not reset it.

    Alternatively, this could be written with Pango markup, but I'm not sure that would be any better.

    1. Yeah I avoid the pango markup because they're just allocating a ton of strings. I wonder if some sort of store would be a better idea to hold the author name and color later maybe so we can update it.

      Although, twitch at least does not update previous message when a user changes their color. I can't remember what other services do.

    2. But do we need to worry about it in Talkatu?

    3. I don't think so. I think talkatu not being able to update previous messages is probably fine. Also most clients don't update past messages for a nick change either. So we're probably fine.

  6. talkatu/talkatuinput.c (Diff revision 1)
     
     
    Show all issues

    No need for the if.

  7. 
      
grim
QuLogic
  1. Ship It!
  2. 
      
grim
Review request changed
Status:
Completed