Open pstavirs opened 2 years ago
Hi
Here an example:
from qt_material import export_theme
extra = {
# Button colors
'danger': '#dc3545',
'warning': '#ffc107',
'success': '#17a2b8',
# Font
'font_family': 'monoespace',
'font_size': '13px',
'line_height': '13px',
# Density Scale
'density_scale': '0',
# environ
'pyside2': True,
'linux': True,
}
export_theme(theme='dark_teal.xml', qss='dark_teal.qss', rcc='resources.rcc',
output='theme', prefix='icon:/', invert_secondary=False, extra=extra)
@YeisonCardona This won't work because the linux
variable is evaluated at the time of export, not at run time.
Consider a cross-platform Qt/C++ app which includes the exported .qss - the same app can run on windows or on linux. If the linux
var was set during export, the app running on windows will end up using the linux CSS and vice versa.
I noticed some conditionals in the jinja template. I assume they will be evaluated during build_stylesheet - so for exported themes, the values in the environment during the export will be applicable and the deployed Qt/C++ with QSS has no effect?