diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2021-01-03 11:50:41 +0100 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2021-01-03 11:50:41 +0100 |
commit | 756da05c384e3d9258fc07cf9441d899238503f1 (patch) | |
tree | b3385216148d51a2378a2bed5dfc3f0a27d4f1ec /plugingui/bleedcontrolframecontent.cc | |
parent | 645250e1cd8ce9bc1faea599df7a1b05836bfeb8 (diff) |
Add dggui namespace to libdggui components.
Diffstat (limited to 'plugingui/bleedcontrolframecontent.cc')
-rw-r--r-- | plugingui/bleedcontrolframecontent.cc | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/plugingui/bleedcontrolframecontent.cc b/plugingui/bleedcontrolframecontent.cc index b999062..e5e46c9 100644 --- a/plugingui/bleedcontrolframecontent.cc +++ b/plugingui/bleedcontrolframecontent.cc @@ -35,19 +35,19 @@ namespace GUI { -BleedcontrolframeContent::BleedcontrolframeContent(Widget* parent, +BleedcontrolframeContent::BleedcontrolframeContent(dggui::Widget* parent, Settings& settings, SettingsNotifier& settings_notifier) - : Widget(parent) + : dggui::Widget(parent) , slider_width{250} , settings(settings) , settings_notifier(settings_notifier) { label_text.setText(_("Master Bleed Volume:")); - label_text.setAlignment(TextAlignment::center); + label_text.setAlignment(dggui::TextAlignment::center); label_value.setText(_("0 %")); - label_value.setAlignment(TextAlignment::center); + label_value.setAlignment(dggui::TextAlignment::center); CONNECT(this, settings_notifier.master_bleed, this, &BleedcontrolframeContent::bleedSettingsValueChanged); @@ -57,7 +57,7 @@ BleedcontrolframeContent::BleedcontrolframeContent(Widget* parent, void BleedcontrolframeContent::resize(std::size_t width, std::size_t height) { - Widget::resize(width, height); + dggui::Widget::resize(width, height); slider_width = 0.8 * width; auto x_start = 0.1 * width; @@ -75,12 +75,14 @@ void BleedcontrolframeContent::setEnabled(bool enabled) { this->enabled = enabled; - if (enabled) { + if(enabled) + { label_text.resetColour(); label_value.resetColour(); slider.setEnabled(true); } - else { + else + { label_text.setColour(0.7); label_value.setColour(0.7); slider.setEnabled(false); @@ -95,7 +97,7 @@ void BleedcontrolframeContent::bleedSettingsValueChanged(float value) int percentage = 100 * value; label_value.setText(std::to_string(percentage) + " %"); - slider.setColour(Slider::Colour::Blue); + slider.setColour(dggui::Slider::Colour::Blue); } void BleedcontrolframeContent::bleedValueChanged(float value) |