[texworks] TW-Highlighting-colors aren't equal to GUI-colors

Johannes Heck heck.johannes at googlemail.com
Tue Jan 25 18:14:26 CET 2011

> In addition, TeXworks seems to have predefined, non-customizable syntax
> highlighting color schemes selected in TeXworks Preferences > Editor, one
> for LaTeX and the other for ConTeXt (at least on build r567 which is the
> latest available build for the Mac). That color scheme seems static, ie
> unaffected by the theme.
> You can customise the colours by editing the appropriate files. However,
> each highlighting scheme includes explicit colours, so won't vary with
> OS changes.
> --
> Joseph Wright

I agree in this point, i already expected this for the syntax highlighting.

TeXworks isn't built directly on the OS, but through the Qt multi-platform
> framework for GUI. Hence it's very well possible that its mechanism for
> color setting is independent from the OS theme. The way colors work in QT is
> described at <http://doc.qt.nokia.com/4.7/qcolor.html>.

The mechanism isn't completely independet since the background color of my
TW Window is now black instead of white and the Text vice versa. I found
this under http://doc.qt.nokia.com/4.7/qpalette.html#details:

> We strongly recommend that you use the default palette of the current style
> (returned by QApplication::palette<http://doc.qt.nokia.com/4.7/qapplication.html#palette>())
> and modify that as necessary. This is done by Qt's widgets when they are
> drawn.
> ...
> *Warning:* Some styles do not use the palette for all drawing, for
> instance, if they make use of native theme engines. This is the case for
> both the Windows XP, Windows Vista, and the Mac OS X styles.
I wonder if

> QPalette::Highlight12A color to indicate a selected item or the current
> item. By default, the highlight color is Qt::darkBlue<http://doc.qt.nokia.com/4.7/qt.html#GlobalColor-enum>
> . QPalette::HighlightedText13A text color that contrasts with Highlight.
> By default, the highlighted text color is Qt::white<http://doc.qt.nokia.com/4.7/qt.html#GlobalColor-enum>
> .

are used for the highlighting e.g. the active line in TW or text that was
just put in by using the auto-completion (see *highlight2.JPG* above).
Wouldn't the use of it produce a better contrast, depending on the current
OS color theme (w/o Win Xp-Vista and OS X)?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/texworks/attachments/20110125/fe1887a8/attachment.html>

More information about the texworks mailing list