From 5186102ef5f44b72f655528a45df9f0fa5c49545 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Nusser?= Date: Mon, 17 Apr 2017 17:11:03 +0200 Subject: Push the humanizer buttons closer together. --- plugingui/humanizerframecontent.cc | 7 ++++--- plugingui/humanizerframecontent.h | 3 ++- 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 @@ -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"}; -- cgit v1.2.3