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

Add range display for tempo slider #3693

Merged
merged 18 commits into from
Mar 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
274fcc8
widget: Add WRateRange widget for displaying the current rate slider …
katsar0v Jul 14, 2020
4ceb65d
LateNight: Add tempo range display
Holzhaus Mar 11, 2021
e982c0f
WRateRange: Remove % signal to make room for a second digit
Holzhaus Mar 11, 2021
63c2c4b
LateNight: Increase WRateRange width to make "100" fit
Holzhaus Mar 11, 2021
60616e9
LateNight: Decrease RateRange size (and font size)
Holzhaus Mar 11, 2021
289ec27
Deere: Add rate range display
Holzhaus Mar 12, 2021
c2550a2
LateNight: restore pitch slider size (unblur), adjust rate range size…
ronso0 Mar 12, 2021
fb3902b
LateNight: move rate range displays into Singleton
ronso0 Mar 12, 2021
469de9f
Merge remote-tracking branch 'holzhaus/tempo-range-display' into rate…
ronso0 Mar 12, 2021
2e2a88f
Merge branch 'raterange-23-2' of github.com:ronso0/mixxx into tempo-r…
Holzhaus Mar 12, 2021
f0a0427
Shade: Add rate range display to tempo slider
Holzhaus Mar 12, 2021
deb0cb2
Tango: Add rate range to pitch slider
Holzhaus Mar 12, 2021
4f30dfa
Merge branch 'tempo-range-display' of github.com:holzhaus/mixxx into …
ronso0 Mar 12, 2021
fd9a04a
Shade: Change color of rate range text to dark gray
Holzhaus Mar 12, 2021
7de1dee
LateNight: wider pitch slider scale
ronso0 Mar 12, 2021
4d3a995
Merge branch 'tempo-range-display' of github.com:holzhaus/mixxx into …
ronso0 Mar 12, 2021
7f345f9
Shade: darker rate range text in Dark & Summer Sunset
ronso0 Mar 12, 2021
a2995dd
LateNight: prevent rate slider overlap 3-digit rate range labels
ronso0 Mar 12, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -989,6 +989,7 @@ add_library(mixxx-lib STATIC EXCLUDE_FROM_ALL
src/widget/wwidget.cpp
src/widget/wwidgetgroup.cpp
src/widget/wwidgetstack.cpp
src/widget/wraterange.cpp
)
set_target_properties(mixxx-lib PROPERTIES AUTOMOC ON AUTOUIC ON CXX_CLANG_TIDY "${CLANG_TIDY}")
target_include_directories(mixxx-lib PUBLIC src "${CMAKE_CURRENT_BINARY_DIR}/src")
Expand Down
87 changes: 75 additions & 12 deletions res/skins/Deere/deck_tempo_column.xml
Original file line number Diff line number Diff line change
Expand Up @@ -81,19 +81,82 @@
</Children>
</WidgetGroup>

<WidgetGroup>
<Layout>horizontal</Layout>
<WidgetGroup><!-- Rate slider + range displays -->
<Layout>stacked</Layout>
<SizePolicy>max,me</SizePolicy>
<Children>
<SliderComposed>
<TooltipId>rate</TooltipId>
<Size>40f,-1me</Size>
<MaximumSize>40,200</MaximumSize>
<Slider scalemode="STRETCH">slider-vertical.svg</Slider>
<Handle scalemode="STRETCH_ASPECT">handle-vertical-blue.svg</Handle>
<Connection>
<ConfigKey><Variable name="group"/>,rate</ConfigKey>
</Connection>
</SliderComposed>
<WidgetGroup>
<Layout>horizontal</Layout>
<Children>
<SliderComposed>
<TooltipId>rate</TooltipId>
<Size>50f,-1me</Size>
<MaximumSize>40,200</MaximumSize>
<Slider scalemode="STRETCH">slider-vertical.svg</Slider>
<Handle scalemode="STRETCH_ASPECT">handle-vertical-blue.svg</Handle>
<Connection>
<ConfigKey><Variable name="group"/>,rate</ConfigKey>
</Connection>
</SliderComposed>
</Children>
</WidgetGroup>

<!-- Pitch range indicators: prefix / spacer / range number -->
<WidgetGroup>
<SizePolicy>me,me</SizePolicy>
<Layout>vertical</Layout>
<Size>50f,-1me</Size>
<Children>
<WidgetGroup>
<SizePolicy>me,me</SizePolicy>
<Layout>horizontal</Layout>
<Children>
<!-- Top range limit + prefix -->
<RateRange>
<TooltipId>rate_range_display</TooltipId>
<ObjectName>RateDisplayTopPrefix</ObjectName>
<Channel><Variable name="i" /></Channel>
<Position>Top</Position>
<Display>prefix</Display>
<SizePolicy>me,me</SizePolicy>
</RateRange>
<RateRange>
<TooltipId>rate_range_display</TooltipId>
<ObjectName>RateDisplayTopRate</ObjectName>
<Channel><Variable name="i" /></Channel>
<Position>Top</Position>
<Display>range</Display>
<SizePolicy>me,me</SizePolicy>
</RateRange>
</Children>
</WidgetGroup><!-- Pitch range indicators -->

<WidgetGroup>
<SizePolicy>me,me</SizePolicy>
<Layout>horizontal</Layout>
<Children>
<!-- Bottom range limit + prefix -->
<RateRange>
<TooltipId>rate_range_display</TooltipId>
<ObjectName>RateDisplayBottomPrefix</ObjectName>
<Channel><Variable name="i" /></Channel>
<Position>Bottom</Position>
<Align>Bottom</Align>
<Display>prefix</Display>
<SizePolicy>me,me</SizePolicy>
</RateRange>
<RateRange>
<TooltipId>rate_range_display</TooltipId>
<ObjectName>RateDisplayBottomRate</ObjectName>
<Channel><Variable name="i" /></Channel>
<Align>Bottom</Align>
<Display>range</Display>
<SizePolicy>me,me</SizePolicy>
</RateRange>
</Children>
</WidgetGroup><!-- Pitch range indicators -->
</Children>
</WidgetGroup>
</Children>
</WidgetGroup>

Expand Down
18 changes: 18 additions & 0 deletions res/skins/Deere/style.qss
Original file line number Diff line number Diff line change
Expand Up @@ -2221,3 +2221,21 @@ WEffectSelector {
#CueDeleteButton:hover {
background-color: #4B4B4B;
}

WRateRange {
font-size: 10px;
}

#RateDisplayTopPrefix {
qproperty-alignment: 'AlignLeft | AlignTop';
}
#RateDisplayTopRate {
qproperty-alignment: 'AlignRight | AlignTop';
}

#RateDisplayBottomPrefix {
qproperty-alignment: 'AlignLeft | AlignBottom';
}
#RateDisplayBottomRate {
qproperty-alignment: 'AlignRight | AlignBottom';
}
63 changes: 59 additions & 4 deletions res/skins/LateNight/decks/deck_singletons.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
</Children>
</SingletonDefinition>

<!-- ...used in full & compact deck, minimal deck has its own instance
with smaller labels. -->
<!-- ...used in full & compact deck -->
<SingletonDefinition>
<ObjectName>DeckOverview<Variable name="ChanNum"/></ObjectName>
<Children>
Expand All @@ -20,22 +19,78 @@
</Children>
</SingletonDefinition>

<!-- ...used in full & compact deck. -->
<SingletonDefinition>
<ObjectName>DeckSettings<Variable name="ChanNum"/></ObjectName>
<Children>
<Template src="skin:/decks/deck_settings.xml"/>
</Children>
</SingletonDefinition>

<!-- ...used in full & compact deck -->
<SingletonDefinition>
<ObjectName>KeyControls<Variable name="ChanNum"/></ObjectName>
<Children>
<Template src="skin:/decks/key_controls.xml"/>
</Children>
</SingletonDefinition>

<!-- Rate range displays, top & bottom -->
<SingletonDefinition>
<ObjectName>RateRangeDisplayTop<Variable name="ChanNum"/></ObjectName>
<Children>
<WidgetGroup>
<Size>53f,17f</Size>
<Children>
<RateRange>
<TooltipId>rate_range_display</TooltipId>
<ObjectName>RateRangePrefix</ObjectName>
<Channel><Variable name="ChanNum"/></Channel>
<Position>Top</Position>
<Display>prefix</Display>
<Size>7f,16f</Size>
<Pos>3,0</Pos>
</RateRange>
<RateRange>
<TooltipId>rate_range_display</TooltipId>
<ObjectName>RateRangeText</ObjectName>
<Channel><Variable name="ChanNum"/></Channel>
<Position>Top</Position>
<Display>range</Display>
<Size>18f,16f</Size>
<Pos>35,1</Pos>
</RateRange>
</Children>
</WidgetGroup>
</Children>
</SingletonDefinition>
<SingletonDefinition>
<ObjectName>RateRangeDisplayBottom<Variable name="ChanNum"/></ObjectName>
<Children>
<WidgetGroup>
<Size>53f,16f</Size>
<Children>
<RateRange>
<TooltipId>rate_range_display</TooltipId>
<ObjectName>RateRangePrefix</ObjectName>
<Channel><Variable name="ChanNum" /></Channel>
<Position>Bottom</Position>
<Display>prefix</Display>
<Size>7f,16f</Size>
<Pos>3,0</Pos>
</RateRange>
<RateRange>
<TooltipId>rate_range_display</TooltipId>
<ObjectName>RateRangeText</ObjectName>
<Channel><Variable name="ChanNum" /></Channel>
<Position>Bottom</Position>
<Display>range</Display>
<Size>18f,16f</Size>
<Pos>35,0</Pos>
</RateRange>
</Children>
</WidgetGroup>
</Children>
</SingletonDefinition>

<!-- Decks -->
<!-- minimal deck. used in deck stack and above library -->
<SingletonDefinition>
Expand Down
89 changes: 56 additions & 33 deletions res/skins/LateNight/decks/rate_controls.xml
Original file line number Diff line number Diff line change
Expand Up @@ -90,43 +90,66 @@

<WidgetGroup>
<ObjectName>RateControls</ObjectName>
<SizePolicy>min,min</SizePolicy>
<Layout>horizontal</Layout>
<SizePolicy>min,min</SizePolicy>
<Children>
<WidgetGroup>
<ObjectName></ObjectName>
<Size>45f,119f</Size>

<WidgetGroup><!-- Rate slider + range displays -->
<Layout>stacked</Layout>
<SizePolicy>max,me</SizePolicy>
<Children>
<Label>
<ObjectName>RateCenter</ObjectName>
<Size>5f,5f</Size>
<Pos>2,58</Pos>
<Connection>
<ConfigKey><Variable name="Group"/>,rate</ConfigKey>
<Transform><IsEqual>0.5</IsEqual></Transform>
<BindProperty>highlight</BindProperty>
</Connection>
</Label>
<SliderComposed>
<ObjectName>RateSlider</ObjectName>
<Size>40f,119f</Size>
<Pos>5,0</Pos>
<TooltipId>rate</TooltipId>
<Handle scalemode="STRETCH_ASPECT">skin:/<Variable name="SliderScheme"/>/sliders/knob_pitch_deck.svg</Handle>
<Slider scalemode="STRETCH_ASPECT">skin:/<Variable name="SliderScheme"/>/sliders/slider_pitch_deck.svg</Slider>
<Horizontal>false</Horizontal>
<BarWidth><Variable name="BarWidth"/></BarWidth>
<BarMargins><Variable name="BarMarginPitch"/></BarMargins>
<BarColor><Variable name="BarColorPitch"/>
</BarColor><BarRoundCaps>true</BarRoundCaps>
<BarAxisPos>20.0</BarAxisPos>
<BarUnipolar>false</BarUnipolar>
<Connection>
<ConfigKey><Variable name="Group"/>,rate</ConfigKey>
</Connection>
</SliderComposed>

<!-- Rate slider + center indicator -->
<WidgetGroup>
<ObjectName>RateSliderBox</ObjectName>
<Size>54f,121f</Size>
<Children>
<Label>
<ObjectName>RateCenter</ObjectName>
<Size>5f,5f</Size>
<Pos>2,59</Pos>
<Connection>
<ConfigKey><Variable name="Group"/>,rate</ConfigKey>
<Transform><IsEqual>0.5</IsEqual></Transform>
<BindProperty>highlight</BindProperty>
</Connection>
</Label>
<SliderComposed>
<ObjectName>RateSlider</ObjectName>
<Size>40f,119f</Size>
<Pos>5,2</Pos>
<TooltipId>rate</TooltipId>
<Handle scalemode="STRETCH_ASPECT">skin:/<Variable name="SliderScheme"/>/sliders/knob_pitch_deck.svg</Handle>
<Slider scalemode="STRETCH_ASPECT">skin:/<Variable name="SliderScheme"/>/sliders/slider_pitch_deck.svg</Slider>
<Horizontal>false</Horizontal>
<BarWidth><Variable name="BarWidth"/></BarWidth>
<BarMargins><Variable name="BarMarginPitch"/></BarMargins>
<BarColor><Variable name="BarColorPitch"/></BarColor>
<BarRoundCaps>true</BarRoundCaps>
<BarAxisPos>20.0</BarAxisPos>
<BarUnipolar>false</BarUnipolar>
<Connection>
<ConfigKey><Variable name="Group"/>,rate</ConfigKey>
</Connection>
</SliderComposed>
</Children>
</WidgetGroup><!-- Rate slider + center indicator -->

<WidgetGroup><!-- Rate range indicators -->
<SizePolicy>min,me</SizePolicy>
<Layout>vertical</Layout>
<Children>
<SingletonContainer>
<ObjectName>RateRangeDisplayTop<Variable name="ChanNum"/></ObjectName>
</SingletonContainer>
<WidgetGroup><Size>0min,0me</Size></WidgetGroup>
<SingletonContainer>
<ObjectName>RateRangeDisplayBottom<Variable name="ChanNum"/></ObjectName>
</SingletonContainer>
</Children>
</WidgetGroup><!-- Rate range indicators -->
</Children>
</WidgetGroup>
</WidgetGroup><!-- Rate slider + range displays -->

<WidgetGroup><!-- RateButtons for different rate directions -->
<ObjectName>RateButtons</ObjectName>
Expand Down
Loading