diff options
author | André Nusser <andre.nusser@googlemail.com> | 2017-04-19 22:47:08 +0200 |
---|---|---|
committer | André Nusser <andre.nusser@googlemail.com> | 2017-04-19 22:47:08 +0200 |
commit | 11e2bda54641c1ef4cad38c11d742524966c7e86 (patch) | |
tree | 83186978f4725e33afe3340702e9425135c4a62c /plugingui/diskstreamingframecontent.cc | |
parent | 34e894ed6fbb5af0dcd0a61b02de75d6044aede8 (diff) |
Take memory specific code out of Slider and fix a bug on the way.
Diffstat (limited to 'plugingui/diskstreamingframecontent.cc')
-rw-r--r-- | plugingui/diskstreamingframecontent.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/plugingui/diskstreamingframecontent.cc b/plugingui/diskstreamingframecontent.cc index af21bca..f2536f7 100644 --- a/plugingui/diskstreamingframecontent.cc +++ b/plugingui/diskstreamingframecontent.cc @@ -81,16 +81,16 @@ void DiskstreamingframeContent::resize(std::size_t width, std::size_t height) label_size.resize(slider_width, 15); } -void DiskstreamingframeContent::limitSettingsValueChanged(float value) +void DiskstreamingframeContent::limitSettingsValueChanged(std::size_t value) { int value_in_mb = value/(1024 * 1024); label_size.setText(std::to_string(value_in_mb) + " MB"); - slider.setValue(value); + slider.setValue((float)value/max_limit); } void DiskstreamingframeContent::limitValueChanged(float value) { - settings.disk_cache_upper_limit.store(value); + settings.disk_cache_upper_limit.store(value * max_limit); } void DiskstreamingframeContent::reloadClicked() |