summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndré Nusser <andre.nusser@googlemail.com>2017-04-17 17:11:03 +0200
committerAndré Nusser <andre.nusser@googlemail.com>2017-04-17 17:11:03 +0200
commit5186102ef5f44b72f655528a45df9f0fa5c49545 (patch)
tree0c0a55faf01aa145de5a656096bcd4d354bab165
parent12079c98ba8f15321c2c604c2bae728ec72f15ba (diff)
Push the humanizer buttons closer together.
-rw-r--r--plugingui/humanizerframecontent.cc7
-rw-r--r--plugingui/humanizerframecontent.h3
2 files changed, 6 insertions, 4 deletions
diff --git a/plugingui/humanizerframecontent.cc b/plugingui/humanizerframecontent.cc
index d8363b9..6753836 100644
--- a/plugingui/humanizerframecontent.cc
+++ b/plugingui/humanizerframecontent.cc
@@ -40,9 +40,7 @@ HumanizerframeContent::HumanizerframeContent(Widget* parent,
, settings(settings)
, settings_notifier(settings_notifier)
{
- // FIXME, is resizeChildren broken?
- layout.setResizeChildren(true);
- layout.setVAlignment(VAlignment::center);
+ layout.setResizeChildren(false);
attack.resize(80, 80);
attack_knob.resize(30, 30);
@@ -56,6 +54,9 @@ HumanizerframeContent::HumanizerframeContent(Widget* parent,
falloff.setControl(&falloff_knob);
layout.addItem(&falloff);
+ layout.setPosition(&attack, GridLayout::GridRange{1, 2, 0, 1});
+ layout.setPosition(&falloff, GridLayout::GridRange{2, 3, 0, 1});
+
CONNECT(this, settings_notifier.velocity_modifier_falloff,
&falloff_knob, &Knob::setValue);
CONNECT(this, settings_notifier.velocity_modifier_weight,
diff --git a/plugingui/humanizerframecontent.h b/plugingui/humanizerframecontent.h
index f6895dd..e13f739 100644
--- a/plugingui/humanizerframecontent.h
+++ b/plugingui/humanizerframecontent.h
@@ -28,6 +28,7 @@
#include "knob.h"
#include "label.h"
+#include "layout.h"
#include "widget.h"
#include <iomanip>
@@ -93,7 +94,7 @@ private:
void attackValueChanged(float value);
void falloffValueChanged(float value);
- HBoxLayout layout{this};
+ GridLayout layout{this, 4, 1};
LabeledControl attack{this, "Attack"};
LabeledControl falloff{this, "Release"};