Custom Theme: changing the color of the alert bar - cognos

using CA 11.1.7FP6
I have created a custom theme and changed some colors. I have also disabled the "what's new" messages, ensured that the alert bar is enabled, and applied a custom message. I want to be sure this message stands out by changing the background color. Can this be done in the spec.json file? I don't see documentation supporting customizing the alert bar at https://www.ibm.com/docs/en/cognos-analytics/11.1.0?topic=roles-creating-themes .
Here is the "colors" object in my spec.json file.
"colors": {
"appbarForeground": "#fff",
"appbarBackground": "#1f57a4",
"navbarSelectLine": "#1f57a4",
"navbarPushButtonBackground": "#fff",
"navbarForeground": "#1d3458",
"appbarSelectLine": "#fff",
"navbarBackground": "#eaeaea",
"appbarPushButtonBackground": "#1d3458",
"persistentBannerBarBackground": "#ff0000",
"ba-alert-containerBackground": "#00ff00"
}
I added persistentBannerBarBackground because the object appears to be com.ibm.bi.glass.persistentBannerBar (like com.ibm.bi.glass.appbar)
and ba-alert-containerBackground because the alert container has the class ba-alert-container (which is where I see the color applied, and the appbar has the class "appbar").
But I'm spitballing here. Neither works.

Related

Cannot change color of Hr element via dash

I am using dash to create an application. In that application I use Hr to underline a text. I would like to change the color of the line, but I cannot do it. I have tried with both backgroundColor and color, neither works.
html.Div([html.H5('Simulation time', className='card-title', style=FACTSNUMBERSYTLE),
html.H3("", style=FACTSHEADERSTYLE, id='key-current-time'),
html.Hr(style={'borderWidth': "0.3vh", "width": "25%", "color": "#FEC700"})],
style={"height": "33vh"})
Any suggestions?
I found the solution. I needed to change the border-color property by passing in
'borderColor': ...

How to change default color of SVG in MathJax-Node

I am using MathJax-node to generate SVGs of equations. I would like to change the default color, but so far nothing has worked.
I looked at this answer and tried
mjAPI.config({MathJax: {
styles: {
".MathJax_SVG, .MathJax_SVG_Display": {
fill: "#FFF",
stroke: "#FFF"
}
}}});
I also tried
mjAPI.config({MathJax: {
SVG: {color: "#0FF", fill: "#0F0", stroke: "#F00"}}});
and several variations, like including the styles under SVG, but so far nothing has worked.
I can work around this by setting the style from within the TeX expression, but I would prefer to be able to set a default configuration so I can process expressions without altering them.
MathJax-node wraps its output in a group with fill="currentColor stroke="currentColor" so that it inherits the color from the surrounding text. So one way to change the color would be to set the color of the container that will hold the SVG output. The configuration you give above would do that for MathJax in a browser, since MathJax surrounds its SVG output in a container with class="MathJax_SVG" or class="MathJax_SVG_Display"; but MathJax-node does not produce the container HTML elements that MathJax does, so there are no elements with class MathJax_SVG or MathJax_SVG_Display being generated. In any case, the styles are put into a stylesheet that would be added to the page, not used to add explicit styles to the SVG generated, so you would have to include that stylesheet into the page where the SVG output is being put in order for your configuration above to have an effect, even if the containers with the proper classes were being generated.
What you probably want, however, is to have the currentColor be some specific color instead, so that there is no inheriting of colors. Because SVG is a text-based image format, you can do that using a string replacement in your mathjax-node driver file. For example:
mjAPI.typeset({
math: "x+1",
format: "TeX",
svg: true,
useFontCache: false,
ex: 6, width: 100
}, function (data) {
if (!data.errors) {
console.log(data.svg.replace(/"currentColor"/g, '"red"'));
}
});
would set the color to red in the output.

How to add different color to odd and even rows in a pygtk TreeView

I have created a pygtk TreeView and wanted to add different colors between each line. I went here and it says that there exists a TreeView Style property that does exactly the same.The property is called 'odd-row-color' and 'even-row-color'. So went to my code and tried to apply this by using the set_property(). But i get an error message for doing that
self.customer_view.set_property('even-row-color', gtk.gdk.Color(211, 211, 211))
TypeError: object of type `GtkTreeView' does not have property `even-row-color'
How can achieve that. And where is that property handled?
You can use css (GTK3) to change the colors, something like:
style_provider = Gtk.CssProvider()
css = '''
GtkTreeView row:nth-child(even) { background-color: shade(#base_color, 0.9); }
GtkTreeView row:nth-child(odd) { background-color: shade(#base_color, 1.0); }
'''
style_provider.load_from_data(css.encode('utf8'))
Gtk.StyleContext.add_provider_for_screen(Gdk.Screen.get_default(),
style_provider,
Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION)
Make sure to tell GTK that you want to paint alternate colors:
treeview.set_rules_hint(True)

Setting the navigation bar color in monotouch

I am attempting to write an application with MonoTouch. I need to set the background color of the navigation bar. I'd like to set it to orange. This seems like an easy task, but I can't seem to get it to work. Currently, I'm doing the following in the AppDelegate.cs file:
this.window = new UIWindow (UIScreen.MainScreen.Bounds);
this.rootNavigationController = new UINavigationController();
UIColor backgroundColor = new UIColor(74, 151, 223, 255);
this.rootNavigationController.NavigationBar.BackgroundColor = UIColor.Orange;
However, the navigation bar color is still the default color. How do I set the background color of the navigation bar?
You can do this on an ad-hoc basis as Rob described using the TintColor property:
this.rootNavigationController.NavigationBar.TintColor = UIColor.Orange;
Alternatively, you can also set the TintColor for all UINavigationBars at once using the UIAppearance proxy in iOS 5. This is usually done somewhere near DidFinishLaunchingWithOptions method in the AppDelegate:
UINavigationBar.Appearance.TintColor = UIColor.Orange;
You can check out the Apple doc for more detailed information and implementation restrictions:
http://developer.apple.com/library/ios/#documentation/uikit/reference/UIAppearance_Protocol/Reference/Reference.html
Try changing the TintColor and Translucent properties.

PyQt : give a color to all the textof an application

I would like to change the look of my application in PyQt. I want all the text (in the buttons, labels and such) to be white for exampel, and all the buttons to be a certain color.
Can I change that all at once in the mainWindow ?
I did the following to change the background color of the whole app:
self.setStyleSheet("QMainWindow {background-color: #252526; color: #FFFFFF}")
If I set another stylesheet for the QPushButton for example in the same manner, the style for the QMainWindow will be overridden.
You could call the setStyleSheet() method on your QApplication instance and specify all object names in the CSS string:
app = QtGui.QApplication.instance()
app.setStyleSheet('QLabel{color: #fff;} QPushButton{background-color: #000; color: #fff}')

Resources