Make schemes easy to create with qss stylesheets

Bug #1402236 reported by Owen Williams
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Mixxx
Confirmed
Wishlist
Unassigned

Bug Description

Current mixxx schemes are a little primitive and more targeted at older-style skins. It would be nice to update it for the new skin paradigm.

* colors as variable names: It would be nice to define colors in the qss as @mycolor and then have mixxx do a search and replace on the color names with a scheme-defined set of colors.
* objectname-specific scheme filters -- have a filter only apply to object names that match a regex pattern

Tags: skin usability
Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

see also bug #1328008 and bug #1396705

Color schemes will make a comeback! Probably in 2.1.

jus (jus)
tags: added: skin
Changed in mixxx:
status: New → Confirmed
Revision history for this message
jus (jus) wrote :

Regardless of the return of the color scheme, i think a mini-sass is essential to make skin stylesheets easier to organize and maintain. They are grow to massive code sizes.

For a start, just as suggested in OP, it would be helpful to define some variables like

@myColor = #FFFFFF
@myColor2 = #112233
@h1 = 20px

and use them similar to

#ObjectName {
  font: @h1;
  text-align: left;
  color: @myColor2;
  background-color: @myColor;
  margin: 0.2em;
  border-top: none;
  border-bottom: 1px solid @myColor2;
}

Support for multiline expressions would be a nice-to-have.

tags: added: usability
Be (be.ing)
Changed in mixxx:
milestone: 2.1.0 → none
Revision history for this message
jus (jus) wrote :

While the feature is not implemented as requested yet, there is some progress.
Since 2.1, you can make a color schema work only on specific regions, like

<Scheme>
  <Name>foo</Name>
  <Filters>
    <HSVTweak>
      <HConst>90</HConst>
      <SConst>-30</SConst>
      <VConst>-30</VConst>
    </HSVTweak>
    <Add>
      <Amount>-40</Amount>
    </Add>
  </Filters>
    <Style src="skin:foo.qss"/>
</Scheme>

or load specific stylesheets

<Schemes>
   <Scheme>
     <Name>Style1</Name>
     <Filters/>
     <Style src="skin:style1.qss"/>
   </Scheme>
   <Scheme>
     <Name>Style2</Name>
     <Filters/>
     <Style src="skin:style2.qss"/>
   </Scheme>
</Schemes>

https://github.com/mixxxdj/mixxx/pull/1501

Revision history for this message
ronso0 (ronso0) wrote :

I'd like to adopt part 1 of this bug: colors as variable names

where would I start?
I searched the mixxx code base as well as Qt5 sources for 'css' but I don't find the actual css parser.

Revision history for this message
ronso0 (ronso0) wrote :

the idea:

* declare @mycolor at the top of the style.css or in any <Scheme> node:
 @variables {
  bgcolor1: #ff8800;
  buttonfont: Arial; }
* use variables for css properties:
  border: 2px solid @bgcolor1;
* on skin load, replace var names with values
* variables in <Scheme> overwrite variable declarations in css

Revision history for this message
Daniel Schürmann (daschuer) wrote :
Revision history for this message
ronso0 (ronso0) wrote :

related:
set variables with color scheme https://github.com/mixxxdj/mixxx/pull/1988

Revision history for this message
Swiftb0y (swiftb0y) wrote :

Mixxx now uses GitHub for bug tracking. This bug has been migrated to:
https://github.com/mixxxdj/mixxx/issues/7728

lock status: Metadata changes locked and limited to project staff
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.