You are here

Add new comment

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...

File attachments: