Hello,
the x2goclient has hardcoded light appearance for the various widgets (main window, session list, login window, progress of logging in), which does not work well with dark system theme: the white font is not distinquishable from the background.
I have checked the Qt documentation and there seems to be more ways on how to accomplish that. So far, I have used three various methods:
labelname->setStyleSheet("QLabel { color : black; }");
or
cpal.setColor ( QPalette::Text, Qt::black);
or
QString fonttemplate=("<font color='black'>%1</font>"); nameLabel->setTextFormat ( Qt::RichText ); nameLabel->setText ( fonttemplate.arg( text ) );
which kind of works, though it requires to be written repeatedly throughout the code (sessionbutton.cpp, onmainwindow.cpp, onmainwindow_part4.cpp) for individual widgets and so far I am not able to use a single approach for all widget types (QLabel, QMenu, QPushButton, etc.). The first method seems to be the most general and simplest, however.
Is there a way to set application-wide font colour for anything that appears in the widgets, but not in app menu and other windows (Settings, Session Settings, etc.), because these are styled with the system-wide dark theme?
Where in the code?
P.S. Sorry for possibly stupid question, but since I am not a coder, it is rather a trial & error approach and a lot of googling...
Regards, Milan
-- http://www.milan-knizek.net/ About linux and photography (Czech only) O linuxu a fotografování
On Fri, 2012-02-17 at 16:33 +0100, Milan Knížek wrote:
Hello,
the x2goclient has hardcoded light appearance for the various widgets (main window, session list, login window, progress of logging in), which does not work well with dark system theme: the white font is not distinquishable from the background.
I have checked the Qt documentation and there seems to be more ways on how to accomplish that. So far, I have used three various methods:
labelname->setStyleSheet("QLabel { color : black; }");
or
cpal.setColor ( QPalette::Text, Qt::black);
or
QString fonttemplate=("<font color='black'>%1</font>"); nameLabel->setTextFormat ( Qt::RichText ); nameLabel->setText ( fonttemplate.arg( text ) );
which kind of works, though it requires to be written repeatedly throughout the code (sessionbutton.cpp, onmainwindow.cpp, onmainwindow_part4.cpp) for individual widgets and so far I am not able to use a single approach for all widget types (QLabel, QMenu, QPushButton, etc.). The first method seems to be the most general and simplest, however.
Is there a way to set application-wide font colour for anything that appears in the widgets, but not in app menu and other windows (Settings, Session Settings, etc.), because these are styled with the system-wide dark theme?
Where in the code?
P.S. Sorry for possibly stupid question, but since I am not a coder, it is rather a trial & error approach and a lot of googling... <snip> I don't think it is stupid at all. I have found myself sometimes frustrated at white text boxes with no borders on white backgrounds making it almost impossible to see where to click to enter the field. Thanks for bringing it to the fore - John
Hi Milan, hi everyone contributing,
On Fr 17 Feb 2012 16:33:21 CET Milan Knížek wrote:
Where in the code?
P.S. Sorry for possibly stupid question, but since I am not a coder, it is rather a trial & error approach and a lot of googling...
We are very happy to see people contributing to X2Go. May it be code
patches, ideas, translations...
I am currently trying to keep track with all the incoming patches
which works out quite will, I think. However, I am not able to keep
track with the incoming ideas, though (like the hardcode bright-theme
question/consideration from Milan).
If you feel not heard or seen or remembered enough with one great
idea, please be so kind and resend that one if you feel it really
being an improvement for X2Go. Resend it as often as needed until you
get a definitive yes, delayed or a no.
If your idea comes with a patch, either of us will take a look and it
is _very_ likely that we may incorporate it. So, major objective
should be: providing a patch.
Happy about the dynamics currently in the project, Mike
--
DAS-NETZWERKTEAM mike gabriel, dorfstr. 27, 24245 barmissen fon: +49 (4302) 281418, fax: +49 (4302) 281419
GnuPG Key ID 0xB588399B mail: mike.gabriel@das-netzwerkteam.de, http://das-netzwerkteam.de
freeBusy: https://mail.das-netzwerkteam.de/freebusy/m.gabriel%40das-netzwerkteam.de.xf...
V Fri, 17 Feb 2012 16:33:21 +0100 Milan Knížek <knizek.confy@gmail.com> napsáno:
Hello,
the x2goclient has hardcoded light appearance for the various widgets (main window, session list, login window, progress of logging in), which does not work well with dark system theme: the white font is not distinquishable from the background.
To those interested, a quick workaround w/o need for recompiling is to run:
$ x2goclient -bg white -fg black
which will set background and foreground colours for the whole app, fitting with the hardcoded look&feel. (Both parameters exist for any Qt app. Probably works only in X Window system.)
The app then looks different than the rest of the DE, of course.
http://www.milan-knizek.net/ About linux and photography (Czech only) O linuxu a fotografování