I return to the topic of theming for Qtractor.
After some time testing I think I am clear about the necessary functionality.
Currently it is possible to apply styles in Qtractor with the "qt5ct" application, but I think it would be nice if it could be done directly from Qtractor without installing anything else.
_INTRODUCTION
The color scheme, as recognized in Qt's own documentation, falls very short.
Different parts of an application may require different schemas.
Qt Styles rule color schemes, so your Color Scheme settings can be unpredictable in practice.
Not everything is color, sometimes it is thicknesses or sizes that we are interested in modifying.
Fortunately Qt has implemented QSS, based on CSS logic.
The order of priority in styles is like this:
Color Scheme < StyloQt < QSS Style
This allows us to greatly customize the appearance of the application.
_Examples that I have made.
Personally, the raised strip that the Qt fusion style puts on the toolBar bothers me a lot.
For dark themes I have a hard time finding a good combination for the time bar that doesn't conflict with other parts of the app.
I took the opportunity to eliminate that ugly icon for the handle and replace it with a discreet symbolic bar.
Etc etc.
This would be the QSS code.
/* ------------------------------------------ */
QToolBar{
border-top: 1px solid rgb(250, 250, 250, 30);
border-bottom: 1px solid rgba(0, 0 ,0, 30);
background: qlineargradient(x1:0, y1:0, x2:0, y2:1,
stop:0 rgba(0, 0 ,0, 15),
stop:1 rgb(250, 250, 250, 15));
}
QToolBar::handle {
margin: 2px;
background: rgb(125, 125, 125, 100);
}
qtractorTrackTime {
margin-top: 1px;
border: 1px solid #555555;
background: #333333;
}
/* ------------------------------------------ */
Another example, stand out elements such as the clock:
IMPLEMENTATION
The file can simply be read from outside by storing the absolute path in the options file.
You could also make it, like the Color Theme option, incorporate a small editor with import, export, etc... but it is really dispensable and I suppose it is complex to implement.
Here they explain the basic way to import QSS.
https://stackoverflow.com/questions/4448236/how-could-qt-apply-style-fro...
Copyright (C) 2006-2024 rncbc aka Rui Nuno Capela. All rights reserved.
Powered by Drupal
Recent comments
1 min 1 sec ago
12 min 47 sec ago
1 hour 39 min ago
2 hours 55 min ago
4 hours 1 min ago
8 hours 56 min ago
9 hours 18 min ago
14 hours 35 min ago
16 hours 23 min ago
16 hours 27 min ago