When I create a CSS provider with gtk_css_provider_new, and load it with gtk_css_provider_load_from_data, giving it "textview { color: red; font: 30px serif; }" as the data, and apply it to a gtk_text_view by using gtk_style_context_add_provider, the result is that it changes the font size to 30, but leaves the text color as black. What do I have to do the change the text color?
That it changes the font size shows that the CSS is actually working. That it doesn't change the color shows that it's only partly working. Is there something special that has to be done to change text color? Something different than what changes the font size?
If I use gdk_rgba_to_string to show the rgba, it shows it as "rgb(255,0,0)" which shows that the style context actually has the color red. So the only issue is why the red isn't used as the actual text color when the 30px serif is used as the actual font.
To change the color of the text you have to select the text part of the TextView in CSS... it would be something like this
textview text {
color : #4fc3f7;
}
This would change the text color to blue.You could always use the Gtk inspector to identify the css nodes associated with the window(Ctrl + Shift + I or D ) if you want to modify more..
Another way to do this is to use (gtk_text_buffer_create_tag https://developer.gnome.org/gtk3/stable/GtkTextView.html) and add the text using (gtk_text_buffer_insert_with_tags_by_name)
Related
I'm working on the ng-multi-select dropdown (in angular7) and I'm able to make changes to the width size externally. However, I'm not able to change the color of the selected text nor change the checkbox color. In short, I need to change the color blue to gray. I've tried different solutions with no success. Can I anyone see form my code below what I'm doing wrong?
For Angular v8, adding this CSS style should do the trick :
.mat-primary .mat-option.mat-selected:not(.mat-option-disabled) {
color: #17c017 !important;
}
.mat-primary .mat-pseudo-checkbox-checked,
.mat-primary .mat-pseudo-checkbox-indeterminate {
background: #17c017 !important;
}
I have started working with react and material ui and facing problem in changing the color and font of text in the table header. Over riding it doesn't seem to change the default style.It is specified that using "headerStyle"(object) changes the header styling. Can anyone help me with properties that has to be changed to achieve this.
Just checked you code.
Adding className work fine.
<TableHeader className="table-header">
And now you can apply styling you need according to your need like
.table-header{
background: #cdcdcd !important;
}
.table-header th {
color: blue !important
}
This works well for changing the background color and heading color for the table!
I'm using RichTextFx (CodeArea) to highlight my code. I want to change text background color for some keywords and use css below:
.parameter {
-rtfx-background-color: yellow;
}
But it's changes background color for all text between my keywords (:p1 and :p2 in this example). Font color and style change successfully.
use StyleClassedTextArea.setStyleClass(from, to, "class Name"); to add class name to some specific range.
Looking to override css wordpress default bold color of white. I do not want to override the default color of white everywhere, just when i need to. I what to do this with css. I can use a custom class to for each title.
For titles like:
KOREKOTE APPLICATIONS or KOREKOTE FEATURES.
http://www.korekote.com/epoxy-coating/
Try like this:
HTML:
<strong class="black_text">KOREKOTE</strong>
CSS:
#theme-page strong.black_text {
color: #000000;
}
Use the text color as per your requirement. I used black text color. Hope this helps you!
I have a Flex Spark Button that I've changed the background to a dark color using
s|Button {
color: #66ffff;
chromeColor: #333333;
}
The problem is that when the button is disabled, it's very hard to read (the text color and background color are very close). I've tried setting the disabled color to something lighter
s|Button:disabled {
color: #ffffff;
}
But the disabled text's color is not #ffffff. It's some combination of the text color and the background. Is there someway to disable this behavior (ie, specify the exact disabled state's text color)?
You are battling with the default skin of the button. If you were to create a new button skin based on ButtonSkin, you would see that the alpha for the entire skin is set: alpha.disabled="0.5".
Setting the value to 1.0 solves your problem, but it seems overkill to define this entire skin just to modify this single value.
Hopefully, there is a more elegant way. I tried setting alpha: 1.0; in the disabled style, but it doesn't take. The only thing I have been able to do is create a new button style, set alpha.disabled="1.0" and telling the button to use that slightly modified style.
You can create 2 .css files, one for the standard view and one for the "disabled" view and set your own button properties. Write a function which changes the .css file to use.