Skip to content
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

Knob arc tweaks #2686

Merged
merged 1 commit into from
Apr 22, 2020
Merged

Knob arc tweaks #2686

merged 1 commit into from
Apr 22, 2020

Conversation

ronso0
Copy link
Member

@ronso0 ronso0 commented Apr 19, 2020

This tweaks WKnobComposed arcs (#2275 ) to always draw knob arcs circularly regardless of the widget's aspect ratio.
I also added an optional background arc.

image

The arcs are now set up like this

<KnobComposed>
  <Size>35f,30f</Size>
  <Knob>skin:/knob.svg</Knob>
  <BackPath>skin:/knob_bg.svg</BackPath>
  <MinAngle>-135</MinAngle>
  <MaxAngle>135</MaxAngle>
  <ArcRadius>12.5</ArcRadius>
  <ArcUnipolar>true/false</ArcUnipolar> // default: false
  <ArcColor>#654321</ArcColor>
  <ArcBgColor>#000</ArcBgColor>
  <ArcThickness>2</ArcThickness>
  <ArcBgThickness>1.5</ArcBgThickness>
  <KnobCenterYOffset>2</KnobCenterYOffset>
  <Connection>
    <ConfigKey>group,control</ConfigKey>
  </Connection>
</KnobComposed>

ToDo

  • remove demo styles

@ronso0 ronso0 added the skins label Apr 19, 2020
@ronso0 ronso0 added this to the 2.3.0 milestone Apr 19, 2020
@ronso0
Copy link
Member Author

ronso0 commented Apr 19, 2020

We should also add a <ArcReverse> option later on to allow drawing arcs counter-clockwise. Effect parameters (and Meta knobs?) like LowPassFilter and Downsampling could use that to draw an arc that adequately reflects the actual effect on the signal.
@Be-ing Could WEffectParameterKnobComposed request that info from the effect manifest? Did you think about something like this when working on #2618 ?

@ronso0 ronso0 marked this pull request as draft April 19, 2020 18:05
@ronso0
Copy link
Member Author

ronso0 commented Apr 19, 2020

(marked as draft so we don't accidentally merge it with the demo implementation)

@Be-ing
Copy link
Contributor

Be-ing commented Apr 19, 2020

Interesting idea. We could add a bool to the EffectParameterManifest for that.

@ronso0
Copy link
Member Author

ronso0 commented Apr 20, 2020

@Holzhaus @zezic
Any comments from you?

@Holzhaus
Copy link
Member

Looks super nice on your Screenshots already, but I didn't have time to test it myself yet.
I guess it's not possible to set the arc color via qss? That would make it possible to have different colors for different color schemes.

@ronso0
Copy link
Member Author

ronso0 commented Apr 20, 2020

Right now I'm about to tqeak LateNight which already has a nice template/variable system, and there the knob colors, radius etc. are set in the <Scheme> nodes via <SetVariable>. All color defs in one place, as easy as it gets...

@ronso0 ronso0 mentioned this pull request Apr 21, 2020
1 task
Copy link
Member

@Holzhaus Holzhaus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Beautiful, thank you! LGTM.

@ronso0
Copy link
Member Author

ronso0 commented Apr 22, 2020

Thanks! It's ready then.
Reminder for myself: add docu to the skin wiki

@Be-ing Be-ing marked this pull request as ready for review April 22, 2020 14:07
@Be-ing Be-ing merged commit 688d204 into mixxxdj:master Apr 22, 2020
@Be-ing
Copy link
Contributor

Be-ing commented Apr 22, 2020

Are you planning to add this to LateNight for 2.3?

@ronso0
Copy link
Member Author

ronso0 commented Apr 22, 2020

Are you planning to add this to LateNight for 2.3?

Sure, that was basically the motivation for this and the slider bars.
Considering hot it did and will evolve, I think LateNight should be the default skin in 2.3.
sneak preview:
image

@ronso0 ronso0 deleted the knob-arc-tweaks branch April 22, 2020 14:15
@Be-ing
Copy link
Contributor

Be-ing commented Apr 22, 2020

OOOOOOOO that looks niiiice!

@Be-ing
Copy link
Contributor

Be-ing commented Apr 22, 2020

I think the master, booth, and headphone gain knobs should not show arcs at center though

@ronso0
Copy link
Member Author

ronso0 commented Apr 22, 2020

Unlike relative +/- knobs (EQ, filter, headMix, balance), Master, Booth etc. are absolute level knobs after all (not the most descriptibe term) which have zero "effect" when fully turned ccw. Thus the level should be visible even though it's mostly stays at the default value in most use cases.

We can disccuss all that in detail in LateNight update PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants