Issue #810 open

black on black (totally not visible) text with dark theme

created an issue

I am using dark theme, with totally black background and white text. thg gets text color in diff section not from theme, but from the other location (hardcode?). I didn't find any option in thg, that can be change this behavior.

Comments (10)

  1. Dmitry Kolesnikov

    There I fixed this

    --- a/tortoisehg/hgqt/
    +++ b/tortoisehg/hgqt/
    @@ -200,6 +200,11 @@ class DiffLexerSelector(_ScriptLexerSelector):
                         lexer.setPaper(QtGui.QColor(e[18:]), i)
             font = qtlib.getfont('fontdiff').font()
             lexer.setFont(font, -1)
    +        palette = QtGui.QApplication.palette()
    +        colorGroup = QtGui.QPalette.Active
    +        colorRole = QtGui.QPalette.Text
    +        color = palette.color(colorGroup, colorRole)
    +        lexer.setColor(color, 0)
             return lexer
  2. Yuya Nishihara

    lexers: invert lightness of low-contrast colors (refs #810)

    This should fix the black-on-black problem in diff/file view. Annotate view still have this problem because it changes the background to whitish colors.

    → <<cset 1f299d7be5ff>>

  3. Juan Monachesi

    I just want to add that is not only an issue for black themed desktops, any color different than white used as background color makes tortoisehg display unreadable output.

  4. Log in to comment