From 70f06394fb47a73fd38a813dddf12b5c964138a2 Mon Sep 17 00:00:00 2001 From: Antoine C Date: Tue, 6 Feb 2024 23:55:31 +0000 Subject: [PATCH 1/5] feat: add beatloop anchor to set and adjust loop from either start or end --- .../classic/buttons/btn__loop_anchor_end.svg | 50 +++++++++ .../buttons/btn__loop_anchor_start.svg | 50 +++++++++ .../controls/button_2state_persist.xml | 6 +- .../decks/row_5_transportLoopJump.xml | 11 +- .../palemoon/buttons/btn__loop_anchor_end.svg | 67 ++++++++++++ .../buttons/btn__loop_anchor_start.svg | 67 ++++++++++++ res/skins/LateNight/style_classic.qss | 10 +- res/skins/LateNight/style_palemoon.qss | 7 ++ src/controllers/controlpickermenu.cpp | 5 + src/engine/controls/loopingcontrol.cpp | 101 +++++++++++++----- src/engine/controls/loopingcontrol.h | 10 +- src/skin/legacy/tooltips.cpp | 5 + src/test/looping_control_test.cpp | 18 +++- 13 files changed, 372 insertions(+), 35 deletions(-) create mode 100644 res/skins/LateNight/classic/buttons/btn__loop_anchor_end.svg create mode 100644 res/skins/LateNight/classic/buttons/btn__loop_anchor_start.svg create mode 100644 res/skins/LateNight/palemoon/buttons/btn__loop_anchor_end.svg create mode 100644 res/skins/LateNight/palemoon/buttons/btn__loop_anchor_start.svg diff --git a/res/skins/LateNight/classic/buttons/btn__loop_anchor_end.svg b/res/skins/LateNight/classic/buttons/btn__loop_anchor_end.svg new file mode 100644 index 00000000000..83862602730 --- /dev/null +++ b/res/skins/LateNight/classic/buttons/btn__loop_anchor_end.svg @@ -0,0 +1,50 @@ + + + + + + image/svg+xml + + + + + + + + + + + diff --git a/res/skins/LateNight/classic/buttons/btn__loop_anchor_start.svg b/res/skins/LateNight/classic/buttons/btn__loop_anchor_start.svg new file mode 100644 index 00000000000..c43541f5c67 --- /dev/null +++ b/res/skins/LateNight/classic/buttons/btn__loop_anchor_start.svg @@ -0,0 +1,50 @@ + + + + + + image/svg+xml + + + + + + + + + + + diff --git a/res/skins/LateNight/controls/button_2state_persist.xml b/res/skins/LateNight/controls/button_2state_persist.xml index 124e28c04a3..beab021f15d 100644 --- a/res/skins/LateNight/controls/button_2state_persist.xml +++ b/res/skins/LateNight/controls/button_2state_persist.xml @@ -24,14 +24,14 @@ Variables: skins:LateNight//buttons/btn__.svg - skins:LateNight//buttons/btn___pressed.svg + skins:LateNight//buttons/btn___active.svg 1 - skins:LateNight//buttons/btn___active.svg - skins:LateNight//buttons/btn___pressed.svg + skins:LateNight//buttons/btn__.svg + skins:LateNight//buttons/btn___active.svg diff --git a/res/skins/LateNight/decks/row_5_transportLoopJump.xml b/res/skins/LateNight/decks/row_5_transportLoopJump.xml index 8a5c8ac5a9c..f4a6c276131 100644 --- a/res/skins/LateNight/decks/row_5_transportLoopJump.xml +++ b/res/skins/LateNight/decks/row_5_transportLoopJump.xml @@ -230,7 +230,7 @@ vertical min,min 78,52 - 86,52 + 104,52 AlignLeftTop @@ -251,7 +251,7 @@ Spinbox_ me,min 46,26 - 72,26 + 77,26 ,beatloop_size