Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change CodeArea default textcolor #187

Closed
kanashius opened this issue Oct 1, 2015 · 5 comments
Closed

Change CodeArea default textcolor #187

kanashius opened this issue Oct 1, 2015 · 5 comments

Comments

@kanashius
Copy link

Maybe an Issue, maybe I just do not know, how to do it.
I want to set the default text of the CodeArea.
I changed:
.code-area{
-fx-background-color:#222222;
}
.styled-text-area .label{
-fx-background-color:#111111;
-fx-text-fill:#888888;
}
.code-area .scroll-bar:horizontal ,
.code-area .scroll-bar:vertical{
-fx-background-color:#000000;
}
.code-area .scroll-bar:horizontal .thumb{
-fx-background-color: linear-gradient(#040404 0%,#1d1d1d 50, #040404 0%);
}
.code-area .scroll-bar:vertical .thumb{
-fx-background-color: linear-gradient(to right,#040404 0%,#1d1d1d 50, #040404 0%);
}
As workaround I used all not matched characters (Syntax) as another matchgroup with the textcolor.

@TomasMikula
Copy link
Member

The following should do:

.code-area .text {
    -fx-fill: #888888;
}

In order to not override other styles, make the selectors for other styles more specific, i.e. .code-area .text.keyword instead of just .keyword.

@kanashius
Copy link
Author

Thank you, that works fine 👍
Just did not find the .text... Tryed so much like list-view, list-cell,label,...

@dim-s
Copy link

dim-s commented Apr 21, 2016

@TomasMikula

What about LineNumberFactory with the .lineno class? If I use this css selector .code-area .text, it changes the color for the line number labels and .code-area .lineno overrides styles for lineno. My css:

.code-area .text {
    -fx-fill: #E0E2E4;
}
.code-area .lineno {
    -fx-text-fill: red; /* it doesn't work */
    -fx-fill: red; /*  it doesn't work too */
}

@TomasMikula
Copy link
Member

Hi, can you please try using a more specific selector in order to take precedence, like

.code-area .lineno .text {
    -fx-fill: red;
}

or a more specific selector that does not select line numbers to start with, like

.code-area .text-flow .text {
    -fx-fill: #E0E2E4;
}

?

@dim-s
Copy link

dim-s commented Apr 22, 2016

Hi, the first solution .code-area .lineno .text works fine!

Many thanks 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants