Override light/dark mode launch screen on iOS13 - ios13

I only need the light mode on my current app. So I have override the interface style with overrideUserInterfaceStyle = .light but launch screen can not be programmatically modified.
How could I override the launch screen interface style of a launch screen on iOS13?

In your launch screen, only use non-dymanic colors. For example, use "black" instead of "label" or "Default". Use white instead of "systemBackground" or "Default".

Related

How to hide circle from radio button and only show icon in qt?

I want user to select a theme which he wants to apply to the document.
So i have created a popup dialog which has multiple themes which are qradiobutton. But I want to display only icons and remove circle from the widget.
I have tried visible:hidden for the radio button but that didn't worked.
If you want to customize QRadioButton with style-sheets I suggest you check the reference documentation: https://doc.qt.io/qt-5/stylesheet-reference.html#qradiobutton-widget
You should also find useful the examples given in Qt documentation as it shows how to replace the check indicator by different images:
QRadioButton::indicator {
width: 13px;
height: 13px;
}
QRadioButton::indicator::unchecked {
image: url(:/images/radiobutton_unchecked.png);
}
QRadioButton::indicator:unchecked:hover {
image: url(:/images/radiobutton_unchecked_hover.png);
}
https://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qradiobutton
If you do this yo can just use the indicator to display the icon and leave the QRadioButton label empty.
However, I have to warn you, depending on which QStyle you are using, it could happen that using style-sheets destroys completely the style of a component. A general example is: you are using a style where buttons have round corners, you use style-sheets to change the font of the button and as a result the button does not have round corners anymore. This is caused by incompatibilities between some QStyle and the style-sheet mechanism. If you do not want to make a multi platform app, it might not be an issue as you will use only one style, but if you make an multi platform app, you have to check every possible style you platform can have on the different platforms.
So if you want to have a QRadioButton without indicator and not use style-sheets, you can do it in C++ directly by subclassing QAbstractButton. Just make sure you set your class to be autoExclusive so that is will behave like a radio button.
would you try this? ( visible => visibility )
input[type="radio"] {
visibility: hidden;
}
or
input[type="radio"] {
display: none;
}

change the style of default title in stage using javafx

I want to change the style of title in stage but i couldn't find anything.
I tried some css codes like:
.title {
-fx-font-size: 18px;
-fx-font-family: "B Homa";
}
but it didn't work for me.I searched about the style of window in javafx and I figured it out that the default style of every native window is Decorated and for designing a custom window I must use UNDERCOATED mode, but I just want to change the size and font style of native window (different font and size) .
I think this is not possible with a decorated default window. The window itself is a native window from your OS. For example on windows the window implementation is:
com.sun.glass.ui.win.WinWindowand
the title is managed in a native method:
#Override native protected boolean _setTitle(long ptr, String title);

JavaFX css vs Preferences

I am wondering what is the right way to make a css-styled application user-configurale by Preferences/ Settings?
I would like to give the user a choice to define some colors via the application's preferences menu which are right now defined via css.
For example, I have a 'warning' color defined: (root.css:)
.warning {
-fx-background-color: coral;
}
Now I would like to add a color picker to let the user override this setting.

Qt and high dpi screens

I've read several articles on this. So I have a Dell XPS 13 and changed the size of text, apps and other items to 200%
But I guess my question is the following. When I launch the application through Qt Designer everything looks good:
But when I run the application outside of the Designer( meaning just double clicking the application to run it), the size is different:
This toolbar is actually smaller than what the screenshot shows. So my question is there a setting I can set my application so when I launch it outside of the Designer it will look like when it was launched from the Designer?
For certain widget classes you can try to provide size measures relative to its font size with the stylesheet:
pMyWidget->setStyleSheet(
"MyWidget {" // What type is it?
"min-width: 80em;" // If the dimension
"min-height: 40em;" // attribute is
"width: 160em;" // applicable
"height: 80em;" // to this type.
// margin: // See the list
// padding: // of related
// spacing: // attributes
"}");
That "em" refers to capital "M" font size AFAIR. The tricky part here is what actual MyWidget type is and if you can apply a stylesheet like that. You can probably omit the widget type in style MyWidget {} but leave the contents yet it supposed to modify all the widgets that that one is parenting.

Change StyleSheet of QToolBox in Qt

I am designing a GUI in Qt. I have a MainWindow and a QToolBox in it. The class of my MainWindow is QTabWidget.
According to the following pictures, I have a QToolBox with two tab named Encoder and Decoder.
I could change the background color of each tab and its border.
But I don't know how to change the color of background of each pane/tab.
For example I want to change the color of Decoder pane to blue as follow.
It is possible to put a frame-widget to page and change its background.
But is it possible to change the stylesheet of QToolBox directly.
Use this stylesheet to access certain pages in QToolBox:
QWidget#page,
QWidget#page_2,
{
background: blue
}
Where page and page_2 are object names of your pages. You can find them in QtDesigner - currentItemName.
Or use this stylesheet to apply changes to all pages:
QToolBox QScrollArea>QWidget>QWidget
{
background: blue;
}
Have you tried:
QToolBox tb;
tb.setStyleSheet("background-color: blue");
If that won't do for you, there is a good list of examples on Qt Style Sheets. Maybe you can find what you want from here.

Resources