summaryrefslogtreecommitdiff
path: root/plugingui/diskstreamingframecontent.cc
diff options
context:
space:
mode:
authorAndré Nusser <andre.nusser@googlemail.com>2017-04-19 22:47:08 +0200
committerAndré Nusser <andre.nusser@googlemail.com>2017-04-19 22:47:08 +0200
commit11e2bda54641c1ef4cad38c11d742524966c7e86 (patch)
tree83186978f4725e33afe3340702e9425135c4a62c /plugingui/diskstreamingframecontent.cc
parent34e894ed6fbb5af0dcd0a61b02de75d6044aede8 (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.cc6
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()