How to specify the background color of a page? - wechat-miniprogram

I don't understand how to specify the background color of a given page.
In app.json, I have the following:
"window":{
"backgroundColor": "#ff0000"
}
This color is applied in the very background, I can see it if i try to scroll the page with my finger.
But my views are still white.
I tried to simply add the background color of my view and it is mostly working, but the last view is not expanding to the bottom of the screen, so I still have a white area.
How can I either:
Request all the view to be transparent so that I can see the background color specified in app.json
Create a view which expand to the bottom of the page, without creating a scrollbar

There is a root element in Wechat Mini-program named page.
So the following code will make the work:
page
{
background-color: red;
}

Related

kentico widget config button unclickable

Is there any way to make a widget's config and move buttons be placed at the top of the widget itself.
As it is one has to hover over a widget in order to see which one of the items in the widget zone it belongs to. This is impossible though when the content of the widget is not in the same screen space (I had to zoom out in the browser in order to get the below screenshot) unless you zoom out and then zoom back in.
In this image, there are 3 seperate widgets (red, white and green respectively) in a single widget zone.
Also, when the mouse leaves the widget the widget config/move buttons are no longer visible.
One solution is to right-click on the widget and then scroll up to the config wheel but this is not something I want to tell my editors they have to do.
Has anyone else come across this problem and if so, how did they solve it?
This can happen when you have CSS conflicts. You can use Chrome Inspector, Firebug, or IE developer tool to investigate and see if anthing is 'overlapping' those buttons (often a floating div is overlapping the buttons and intercepting the 'click')
Then once you figure out a css class to make it work, just add it to your style sheet with ".EditMode " before it, this is a special class that is on the body when in page editor.
Example:
.EditMode .MyFloatingDivThatsCoveringTheWidgets {
z-index: 0;
}

Whole Title Bar of the application layout is shown as link

we built an xpages app with the extlib application layout, and use the title bar for tabbed links.
Irritating for the users is the effect that the whole title bar is shown as link, i.e. the mouse changes to a link symbol (hand) for the whole title bar row.
Clickable are only the title bar tabs (as expected and correct), but users very often try to get "back home" by clicking on the title (left in the title bar).
Did we create that effect by sth.? or is this the normal bootstrap (3.2.0) design?
thx, Uwe
Add following CSS to your XPage(s):
.nav {
cursor: auto;
}
Then, only tabbed links will have a pointer cursor in title bar.
This overwrites the settings in xsp-mixin.css:
/*Bootstrap relies on the href attribute on a's to show the correct cursor: fix for XPage pagination that by default doesn't have that*/
.nav, .pagination, .carousel a {
cursor: pointer;
}
I checked for side effects but couldn't find any issue with other elements not showing pointer cursor where needed.

How do I set a background colour for QTextBrowser?? (PyQt)

I have created a QTextBrowser and I wanted to know how i would set the background colour of the whole widget.
I have tried QTextBrowser.setBackground(QtGui.QBrush(QtCore.Qt.blue, QtCore.Qt.SolidPattern)) with no luck.
In this case I suggest you to use stylesheet:
If in QDesigner, right click on the control, click "Set Stylesheet" and write
background-color: blue;
If you want to do it by code, just use
YourControlTextBrowser.setStyleSheet("background-color: blue;")

Getting the OS theme color values in PyQt

I just want to get the background color values of any widget (button, list item, textbox) when it's hovered and it's selected, which i'm looking to use in my custom stylesheet.
For better understanding I'm attaching the following screen shots taken in Ubuntu. The same is applicable for Windows also.
With hover effect :
With selected effect :
The selected color is returned by QPalette.color() for the key QPalette.Highlight.
And in a stylesheet, you can use { background-color: palette(highlight) }.
The hover background color doesn't seem to be part of the QPalette colors, but is apparently either painted as part of the native widgets API (gtk), or hardcoded into the QStyle classes.

How to remove the dark shadow of the screen when a Dialog is shown?

When a Dialog is shown then the background of screen is darkened. I want to remove this darkness so that the screen looks like normal. How to achieve that ?
When you show a Dialog the background becomes a Form, changing its style you can modify the background of a Dialog. I don´t really know if you can make this Form transparent. I use the LWUIT-Theme creator and modifiying the Form´s style, I can change the background for an image o for one colour.
Try it here!
http://lwuit.java.net/
Set the tint color of the parent form, you can also set this in the look and feel class and within the theme constants in the resource editor.
just add below code on your dialog:
dialog.getWindow().clearFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND);

Resources