summaryrefslogtreecommitdiff
path: root/plugingui/diskstreamingframecontent.cc
diff options
context:
space:
mode:
authorAndré Nusser <andre.nusser@googlemail.com>2017-04-17 23:08:25 +0200
committerAndré Nusser <andre.nusser@googlemail.com>2017-04-17 23:08:25 +0200
commit222e03c83e92cb22ad1482b7ec510ee44b521023 (patch)
treec334bf9c81c4a642af3a7466423875e29a22b343 /plugingui/diskstreamingframecontent.cc
parent1a569cd1ef2879680fced10ea3e77e77b896e0c1 (diff)
Fix some Slider issues.
Diffstat (limited to 'plugingui/diskstreamingframecontent.cc')
-rw-r--r--plugingui/diskstreamingframecontent.cc5
1 files changed, 2 insertions, 3 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);
}