-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enables style sheets for knob line colors for all knob types #2680
Enables style sheets for knob line colors for all knob types #2680
Conversation
FYI, Travis error was a stalled Mac build. Re-started to ensure it passes (which it should). 👍 |
default: | ||
break; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very interesting.... so lineColor
was already part of the API but wasn't used for this particular draw function? Elegant.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tresf Yes, the property lineColor
was neither used in the style sheet nor in the code.
The fix works as follows: until now the method Knob::drawKnob has used hard coded palette colors to draw the knob lines for the different knob types. These palette colors are now assigned to the line color property in Knob::initUi. The method Knob::drawKnob in turn now uses the line color property for almost all knob types. This means that all knobs lines will be painted in the same color as before unless that property is overridden by the stylesheet. Also removes an unnecessary typedef from QWidget to trackSettingsWidget in Track.h.
ce9e8a8
to
c686306
Compare
@tresf I have just rebased against the current master which does not have the enum |
Where in the .css file can I change the color? this didn't fix it for me, the color is still linked by qproperty-windowText. |
@IvanMaldonado You should be able to change the line color using the TrackView Knob {
qproperty-lineColor: rgb(255, 0, 0);
} |
@michaelgregorius Thank you! I didn't know you had to do that, it works fine for me 👍 Edit: What about the bigger knobs? |
@IvanMaldonado Just put |
@Umcaruje Thank you 👍 |
@IvanMaldonado Sorry, I was not messaged with regards to your edit but it looks like your question got answered. |
The fix works as follows: until now the method
Knob::drawKnob
has usedhard coded palette colors to draw the knob lines for the different knob
types. These palette colors are now assigned to the line color property
in
Knob::initUi
. The methodKnob::drawKnob
in turn now uses the linecolor property for almost all knob types. This means that all knobs
lines will be painted in the same color as before unless that property
is overridden by the stylesheet.
Also removes an unnecessary
typedef
fromQWidget
totrackSettingsWidget
in
Track.h
.This commit fixes the problem described in HDDigitizerMusic#3.