summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleix Pol <aleixpol@kde.org>2015-11-02 16:59:21 (GMT)
committerAleix Pol <aleixpol@kde.org>2015-11-02 16:59:21 (GMT)
commit5338812387522d9ff625a849ec33558f1f6f0f08 (patch)
tree08bee88d443fb441a1b1b78190890d5c7a7acf80
parent1bfea77eaed972ba1c13aa60074e3bd82552e674 (diff)
Fix actualWidth computation
Perform a floating point division rather than an integer one. Otherwise it was discreet and there used to be jumps while resizing that looked glitchy.
-rw-r--r--discover/MuonDiscoverMainWindow.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/discover/MuonDiscoverMainWindow.cpp b/discover/MuonDiscoverMainWindow.cpp
index ff7876e..583efaa 100644
--- a/discover/MuonDiscoverMainWindow.cpp
+++ b/discover/MuonDiscoverMainWindow.cpp
@@ -212,7 +212,7 @@ bool MuonDiscoverMainWindow::isCompact() const
qreal MuonDiscoverMainWindow::actualWidth() const
{
- return isCompact() ? width() : width()-std::pow(width()/70, 2);
+ return isCompact() ? width() : width()-std::pow(width()/70., 2);
}
void MuonDiscoverMainWindow::resizeEvent(QResizeEvent * event)