Add new comment

Permalink

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-fr…

File attachments
The content of this field is kept private and will not be shown publicly.

Markdown

  • Parses markdown and converts it to HTML.
  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type='1 A I'> <li> <dl> <dt> <dd> <h2 id='jump-*'> <h3 id> <h4 id> <h5 id> <h6 id> <img src alt height width> <strike> <pre> <p> <br>
  • Lines and paragraphs break automatically.

Filtered HTML

  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <b> <i> <pre> <img src alt height width> <strike>
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.
File attachments
Unlimited number of files can be uploaded to this field.
2 MB limit.
Allowed types: jpg jpeg gif png txt doc docx xls xlsx pdf ppt pps odt ods odp zip gz bz2 xz patch diff wav ogg flac ogv mp4 qtz.