Stylesheets for Quarter

A forum for research and development of the user interface of FreeCAD
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
xtemp09
Posts: 72
Joined: Tue Jul 12, 2022 2:16 pm

Stylesheets for Quarter

Post by xtemp09 »

Would the venerable developers consider an option of QSS regulation of the background? It is connected to this feature request.

To my knowledge, the background is regulated with functions in SoFCBackgroundGradient.h and modified in Edit → Preferences → Display → Colors → Background color.

I propose the following: a user chooses a stylesheet (like Behave-dark, Darker-orange, ProDark etc) and the background changes accordingly. Perhaps, the color options should set to override the theme.

I think of QSS in this way:

Code: Select all

QuarterWidget {
	background-color: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 1, stop: 0 white, stop: 0.4 gray, stop: 1 black);
}
or:

Code: Select all

QuarterWidget {
	background: qradialgradient(cx: 0.5, cy: 0.5, fx: 0.3, fy: -0.4, radius: 1.35, stop: 0 #aaa, stop: 1 #ccc);
}
What do you think about this?
User avatar
MisterMaker
Posts: 740
Joined: Mon Sep 21, 2020 7:41 am

Re: Stylesheets for Quarter

Post by MisterMaker »

Totally agree on this we have:
Qt::RadialGradientPattern, Qt::LinearGradientPattern and Qt::ConicalGradientPattern.
I also wonder if we can't use a svg file as background then we have all the options!
Post Reply