meebey / smuxi

Smuxi is an user-friendly and free IRC client for Linux, Windows and Mac OS X based on GNOME / GTK+
https://smuxi.im/
GNU General Public License v2.0
172 stars 46 forks source link

Frontend-STFL: Ensure text color contrast (closes #1033). #215

Closed RavuAlHemio closed 9 years ago

RavuAlHemio commented 9 years ago

Make the terminal background color configurable as STFL/Interface/TerminalBackgroundColor and use GetBestTextColor to ensure sufficient contrast.

Implemented when "black on black" turned out not to be very legible.

meebey commented 9 years ago

Shouldn't it try to obtain the bg color of the terminal or is there no way to request such information via ncurses/STFL? Because this code would only work if the user sets manually via TerminalBackgroundColor. I don't remeber if /config set allows to make frontend settings, I think it doesn't.

meebey commented 9 years ago

If you can't obtain the bg color then I think it would be better if the STFL frontend guarantees a defined bg color instead of undefined.

RavuAlHemio commented 9 years ago

I haven't found any interface between terminal emulators and programs to query the foreground and background colors, so I introduced the configuration variable. It appears that /config only queries UserConfig, not FrontendConfig.

As for predefining a background color, I'm torn between choosing white (xterm and gnome-terminal) and black (Linux console and xfce4-terminal)...

meebey commented 9 years ago

I agree, go ahead with #00000

RavuAlHemio commented 9 years ago

Alright, PR updated. I hope I chose the correct location for specifying config defaults.