diff options
Diffstat (limited to 'plugingui')
-rw-r--r-- | plugingui/diskstreamingframecontent.cc | 5 | ||||
-rw-r--r-- | plugingui/slider.cc | 4 |
2 files changed, 5 insertions, 4 deletions
diff --git a/plugingui/diskstreamingframecontent.cc b/plugingui/diskstreamingframecontent.cc index 53e2c9d..af21bca 100644 --- a/plugingui/diskstreamingframecontent.cc +++ b/plugingui/diskstreamingframecontent.cc @@ -83,9 +83,8 @@ void DiskstreamingframeContent::resize(std::size_t width, std::size_t height) void DiskstreamingframeContent::limitSettingsValueChanged(float value) { - char buf[32]; - snprintf(buf, sizeof(buf) - 1, "%.2f MB", value / (1024 * 1024)); - label_size.setText(buf); + int value_in_mb = value/(1024 * 1024); + label_size.setText(std::to_string(value_in_mb) + " MB"); slider.setValue(value); } diff --git a/plugingui/slider.cc b/plugingui/slider.cc index 2a82a54..ed23fad 100644 --- a/plugingui/slider.cc +++ b/plugingui/slider.cc @@ -135,7 +135,7 @@ void Slider::mouseMoveEvent(MouseMoveEvent* mouseMoveEvent) void Slider::scrollEvent(ScrollEvent* scrollEvent) { - current_value += scrollEvent->delta/(float)getControlWidth(); + current_value -= scrollEvent->delta/(float)getControlWidth(); if (current_value < 0.) { current_value = 0.; @@ -145,6 +145,8 @@ void Slider::scrollEvent(ScrollEvent* scrollEvent) } redraw(); + clickNotifier(); + valueChangedNotifier(current_value * _4GB); // TODO: Scale up to full range } std::size_t Slider::getControlWidth() const |