diff options
Diffstat (limited to 'plugingui')
-rw-r--r-- | plugingui/diskstreamingframecontent.cc | 4 | ||||
-rw-r--r-- | plugingui/locale/da.po | 2 | ||||
-rw-r--r-- | plugingui/locale/drumgizmo.pot | 2 | ||||
-rw-r--r-- | plugingui/locale/fr.po | 2 | ||||
-rw-r--r-- | plugingui/maintab.cc | 4 | ||||
-rw-r--r-- | plugingui/mainwindow.h | 2 | ||||
-rw-r--r-- | plugingui/sampleselectionframecontent.cc | 22 | ||||
-rw-r--r-- | plugingui/sampleselectionframecontent.h | 6 |
8 files changed, 35 insertions, 9 deletions
diff --git a/plugingui/diskstreamingframecontent.cc b/plugingui/diskstreamingframecontent.cc index 4c63817..5420afd 100644 --- a/plugingui/diskstreamingframecontent.cc +++ b/plugingui/diskstreamingframecontent.cc @@ -95,7 +95,7 @@ void DiskstreamingframeContent::resize(std::size_t width, std::size_t height) void DiskstreamingframeContent::limitSettingsValueChanged(std::size_t value) { - float new_slider_value = (float)(value - min_limit)/(max_limit - min_limit); + float new_slider_value = (float)(value - min_limit)/(float)(max_limit - min_limit); slider.setValue(new_slider_value); if(new_slider_value < 0.99) @@ -116,7 +116,7 @@ void DiskstreamingframeContent::limitSettingsValueChanged(std::size_t value) void DiskstreamingframeContent::limitValueChanged(float value) { std::size_t new_limit = value < 0.99 ? - value * (max_limit - min_limit) + min_limit : + value * (float)(max_limit - min_limit) + min_limit : std::numeric_limits<std::size_t>::max(); settings.disk_cache_upper_limit.store(new_limit); diff --git a/plugingui/locale/da.po b/plugingui/locale/da.po index e25235f..e3904d0 100644 --- a/plugingui/locale/da.po +++ b/plugingui/locale/da.po @@ -6,7 +6,7 @@ # msgid "" msgstr "" -"Project-Id-Version: drumgizmo 0.9.17\n" +"Project-Id-Version: drumgizmo 0.9.20\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2019-09-13 21:07+0200\n" "PO-Revision-Date: 2019-09-13 19:42+0200\n" diff --git a/plugingui/locale/drumgizmo.pot b/plugingui/locale/drumgizmo.pot index 72e600e..e93e387 100644 --- a/plugingui/locale/drumgizmo.pot +++ b/plugingui/locale/drumgizmo.pot @@ -6,7 +6,7 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: drumgizmo 0.9.19\n" +"Project-Id-Version: drumgizmo 0.9.20\n" "Report-Msgid-Bugs-To: \n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" diff --git a/plugingui/locale/fr.po b/plugingui/locale/fr.po index b46174c..c2fbb63 100644 --- a/plugingui/locale/fr.po +++ b/plugingui/locale/fr.po @@ -7,7 +7,7 @@ # msgid "" msgstr "" -"Project-Id-Version: drumgizmo 0.9.18.1\n" +"Project-Id-Version: drumgizmo 0.9.20\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2019-09-13 21:07+0200\n" "PO-Revision-Date: 2020-11-21 16:49+0200\n" diff --git a/plugingui/maintab.cc b/plugingui/maintab.cc index 5c5fd02..d95885e 100644 --- a/plugingui/maintab.cc +++ b/plugingui/maintab.cc @@ -131,7 +131,7 @@ MainTab::MainTab(dggui::Widget* parent, layout.setResizeChildren(true); //Left column... - add(_("Drumkit"), drumkit_frame, drumkitframe_content, 14, 0); + add(_("Drumkit"), drumkit_frame, drumkitframe_content, 15, 0); add(_("Status"), status_frame, statusframe_content, 12, 0); add(_("Resampling"), resampling_frame, resamplingframe_content, 10, 0); add(_("Voice Limit"), voicelimit_frame, voicelimit_content, 10, 0); @@ -153,7 +153,7 @@ MainTab::MainTab(dggui::Widget* parent, add(_("Visualizer"), visualizer_frame, visualizerframe_content, 14, 1); visualizer_frame.setHelpText(visualizer_tip); - add(_("Velocity Curve"), power_frame, powerframe_content, 20, 1); + add(_("Velocity Curve"), power_frame, powerframe_content, 21, 1); power_frame.setHelpText(power_tip); humanizer_frame.setOnSwitch(settings.enable_velocity_modifier); diff --git a/plugingui/mainwindow.h b/plugingui/mainwindow.h index ae0da8b..e517a0d 100644 --- a/plugingui/mainwindow.h +++ b/plugingui/mainwindow.h @@ -47,7 +47,7 @@ class MainWindow public: static constexpr std::size_t main_width{750}; - static constexpr std::size_t main_height{800}; + static constexpr std::size_t main_height{740}; MainWindow(Settings& settings, void* native_window); ~MainWindow(); diff --git a/plugingui/sampleselectionframecontent.cc b/plugingui/sampleselectionframecontent.cc index 61b816f..448eca5 100644 --- a/plugingui/sampleselectionframecontent.cc +++ b/plugingui/sampleselectionframecontent.cc @@ -63,9 +63,17 @@ SampleselectionframeContent::SampleselectionframeContent(dggui::Widget* parent, f_random.setControl(&f_random_knob); layout.addItem(&f_random); + f_position.resize(80, 80); + f_position_knob.resize(30, 30); + f_position_knob.showValue(false); + f_position_knob.setDefaultValue(Settings::sample_selection_f_position_default); + f_position.setControl(&f_position_knob); + layout.addItem(&f_position); + layout.setPosition(&f_close, dggui::GridLayout::GridRange{0, 1, 0, 1}); layout.setPosition(&f_diverse, dggui::GridLayout::GridRange{1, 2, 0, 1}); layout.setPosition(&f_random, dggui::GridLayout::GridRange{2, 3, 0, 1}); + layout.setPosition(&f_position, dggui::GridLayout::GridRange{3, 4, 0, 1}); CONNECT(this, settings_notifier.sample_selection_f_close, this, &SampleselectionframeContent::fCloseSettingsValueChanged); @@ -73,6 +81,8 @@ SampleselectionframeContent::SampleselectionframeContent(dggui::Widget* parent, this, &SampleselectionframeContent::fDiverseSettingsValueChanged); CONNECT(this, settings_notifier.sample_selection_f_random, this, &SampleselectionframeContent::fRandomSettingsValueChanged); + CONNECT(this, settings_notifier.sample_selection_f_position, + this, &SampleselectionframeContent::fPositionSettingsValueChanged); CONNECT(&f_close_knob, valueChangedNotifier, this, &SampleselectionframeContent::fCloseKnobValueChanged); @@ -80,6 +90,8 @@ SampleselectionframeContent::SampleselectionframeContent(dggui::Widget* parent, this, &SampleselectionframeContent::fDiverseKnobValueChanged); CONNECT(&f_random_knob, valueChangedNotifier, this, &SampleselectionframeContent::fRandomKnobValueChanged); + CONNECT(&f_position_knob, valueChangedNotifier, + this, &SampleselectionframeContent::fPositionKnobValueChanged); } void SampleselectionframeContent::fCloseKnobValueChanged(float value) @@ -97,6 +109,11 @@ void SampleselectionframeContent::fRandomKnobValueChanged(float value) settings.sample_selection_f_random.store(value); } +void SampleselectionframeContent::fPositionKnobValueChanged(float value) +{ + settings.sample_selection_f_position.store(value); +} + void SampleselectionframeContent::fCloseSettingsValueChanged(float value) { f_close_knob.setValue(value); @@ -112,4 +129,9 @@ void SampleselectionframeContent::fRandomSettingsValueChanged(float value) f_random_knob.setValue(value); } +void SampleselectionframeContent::fPositionSettingsValueChanged(float value) +{ + f_position_knob.setValue(value); +} + } // GUI:: diff --git a/plugingui/sampleselectionframecontent.h b/plugingui/sampleselectionframecontent.h index ab1be04..d3834f6 100644 --- a/plugingui/sampleselectionframecontent.h +++ b/plugingui/sampleselectionframecontent.h @@ -52,20 +52,24 @@ private: void fCloseKnobValueChanged(float value); void fDiverseKnobValueChanged(float value); void fRandomKnobValueChanged(float value); + void fPositionKnobValueChanged(float value); void fCloseSettingsValueChanged(float value); void fDiverseSettingsValueChanged(float value); void fRandomSettingsValueChanged(float value); + void fPositionSettingsValueChanged(float value); - dggui::GridLayout layout{this, 3, 1}; + dggui::GridLayout layout{this, 4, 1}; LabeledControl f_close{this, _("pClose")}; LabeledControl f_diverse{this, _("pDiverse")}; LabeledControl f_random{this, _("pRandom")}; + LabeledControl f_position{this, _("pPosition")}; dggui::Knob f_close_knob{&f_close}; dggui::Knob f_diverse_knob{&f_diverse}; dggui::Knob f_random_knob{&f_random}; + dggui::Knob f_position_knob{&f_position}; Settings& settings; SettingsNotifier& settings_notifier; |