This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Can't get Firefox to *not* use KDE colors

Tags: None
(comma "," separated)
Khym Chanur
Registered Member
Posts
22
Karma
0
OS
Firefox will use whatever KDE color scheme is set at Firefox startup time for the menu-bar, URL-bar, bookmark-bar, tab-bar, text-fields and text-areas. This is true regardless of whether or not Firefox has "Use system colors set" turned on, or whether or not "System Settings > Styles > Colors > Options > Apply colors to non-KDE4 applications" is set. I can change the KDE color scheme after Firefox is already running and it will have no effect of Firefox (except, of course, for the window decorations which are controlled by the KDE window manager).

I'm using KDE 4.3.5 and the default Firefox theme.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Please remove any ~/.gtk* files.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
Khym Chanur
Registered Member
Posts
22
Karma
0
OS
Ah, that did it! Thanks.
User avatar
latebeat
Registered Member
Posts
70
Karma
0
bcooksley wrote:Please remove any ~/.gtk* files.


hmm, this didn't work for me. Firefox and thunderbird still show the kde colors.
Any other suggestions?

ps: I can also confirm that I have unchecked the option to not apply the colors to non-kde apps. Is that a bug?
User avatar
Hans
Administrator
Posts
3304
Karma
24
OS
I get the same thing with the oxygen-gtk theme - from my understanding it seems to be hard-coded. My workaround is to use a different GTK theme (which really is necessary since dark theme + web elements don't work well together).


Problem solved? Please click on "Accept this answer" below the post with the best answer to mark your topic as solved.

10 things you might want to do in KDE | Open menu with Super key | Mouse shortcuts
User avatar
latebeat
Registered Member
Posts
70
Karma
0
Hans wrote:I get the same thing with the oxygen-gtk theme - from my understanding it seems to be hard-coded. My workaround is to use a different GTK theme (which really is necessary since dark theme + web elements don't work well together).


Yeah exactly, my color scheme is dark and I don't like how firefox and thunderbird form fields have a dark color.
I followed your advice and chose qtcurve for gtk+ appearance and it isn't picking up the colors any more. Strange enough though, it seems only qtcurve works properly with gtk+ I tried a few other options and they were still showing up the kde color scheme.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
This could also occur if "Apply colours to non-KDE4 applications" is checked in System Settings > Application Appearance > Colours > Options.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
latebeat
Registered Member
Posts
70
Karma
0
bcooksley wrote:This could also occur if "Apply colours to non-KDE4 applications" is checked in System Settings > Application Appearance > Colours > Options.


Yeah, I have that unchecked. At least in firefox and thunderbird it didn't seem to be having an effect at all.
User avatar
latebeat
Registered Member
Posts
70
Karma
0
latebeat wrote: At least in firefox and thunderbird it didn't seem to be having an effect at all.


is that a bug in kde or is it something with the gtk apps ?
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
I'm not sure, I do know that Firefox/Thunderbird use their own XUL language for many things related to theming - however they are Gtk+ applications still and do follow some Gtk+ styling in places. As such the problem could be anywhere between Firefox/Thunderbird, some Gtk file being picked up on disk and possibly KDE writing out the wrong theme colours.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
Aoxo
Registered Member
Posts
20
Karma
0
This is driving me nuts. Black on black and white on white in form fields!

I've Tried everything..every Firefox setting I could think of. Why Firefox would grab onto certain aspects of the KDE color theme and yet not enough of them to make it usable, I'm not sure. I've tried every possible combination of the two settings in Firefox in attempt to get some control. I would think that having "Use system colors" unchecked would result in pages not having a color specified for an element falling back to a reasonable default, but not a system (KDE) color. The other option is "Allow pages to choose their own colors", which is pretty standard. I don't want to override the pages specified colors, and I don't want to use any colors derived from the KDE color settings. I want form backgrounds to default to sane colors unless the page code specifies differently. Results vary from page to page. The main Google search page gives me white on white, but the Google images search page shows black on white. Fortunately the form I'm typing in here is a readable white text/black background..which would be a correct implementation of the KDE colors I have setup... But I shouldn't be seeing colors from KDE at all right now as I have "Use system colors" unchecked.

The only viable solution I have found is to use a light background and dark foreground for common "view" colors. This is like having a choice of any color as long as it's between #999999 and #FFFFFF. Chrome has no problem, even using the gtk theme settings in chrome.
User avatar
Hans
Administrator
Posts
3304
Karma
24
OS
@Aoxo:

Have you tried using a different GTK theme, as I suggested above?


Problem solved? Please click on "Accept this answer" below the post with the best answer to mark your topic as solved.

10 things you might want to do in KDE | Open menu with Super key | Mouse shortcuts
User avatar
scummos
Global Moderator
Posts
1175
Karma
7
OS
Also try a few different firefox themes, they seem to use different amounts of GTK stuff...


I'm working on the KDevelop IDE.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Please note that many web pages make the unfortunate mistake of specifying only the text or background colour, and not both. This very likely is the cause of your issue, as most web pages assume a white background is the default with dark/black as the font colour.

As for why Firefox is adopting KDE colours - are you using Oxygen Gtk?


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
vayu
Registered Member
Posts
129
Karma
0
OS
You can modify or add the userContent.css file in the chrome directory within your .mozilla directory.
This will let you use whatever colors you want in your system and will not alter the form elements within firefox's page display ~/.mozilla/firefox/xxx.default/chrome/userContent.css:
Code: Select all
input {
    border: 2px inset white;
    background-color: white;
    color: black;
}

textarea {
    border: 2px inset white;
    background-color: white;
    color: black;
}

select {
    border: 2px inset white;
    background-color: white;
    color: black;
}
 
input[type="radio"],
input[type="checkbox"] {
    border: 2px inset white ! important;
    background-color: white ! important;
    color: ThreeDFace ! important;
}

*|*::-moz-radio {
    background-color: white;
}

button,
input[type="reset"],
input[type="button"],
input[type="submit"] {
    border: 2px outset white;
    background-color: #eeeeee;
    color: black;
}

body {
    background-color: white;
    color: black;
    display: block;
    margin: 8px;
}


FYI, userContent.css modifies the way web content is displayed. userChrome.css modifies the way the browser itself (menu's, tabs,..) is displayed. This sets form elements, input boxes, checkboxes, ... to be displayed in black with white background. I found this on the web, it works well for me using dark themes.


Bookmarks



Who is online

Registered users: Baidu [Spider], Bing [Bot], Google [Bot]