[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdebase/workspace/plasma/tools/plasmoidviewer
From: Bill Egert <begert () gmail ! com>
Date: 2007-12-31 19:15:57
Message-ID: 1199128557.413972.26682.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 755245 by begert:
-Fix compile warnings.
M +7 -6 fullview.cpp
--- trunk/KDE/kdebase/workspace/plasma/tools/plasmoidviewer/fullview.cpp #755244:755245
@@ -89,14 +89,15 @@
// The applet always keeps its aspect ratio, so let's respect it.
float ratio = event->oldSize().width() / event->oldSize().height();
- int newPossibleWidth = size().height()*ratio;
- int newWidth, newHeight;
+ float newPossibleWidth = size().height()*ratio;
+ int newWidth;
+ int newHeight;
if (newPossibleWidth > size().width()) {
- newHeight = size().width()/ratio;
- newWidth = newHeight*ratio;
+ newHeight = (int)(size().width()/ratio);
+ newWidth = (int)(newHeight*ratio);
} else {
- newWidth = newPossibleWidth;
- newHeight = newWidth/ratio;
+ newWidth = (int)newPossibleWidth;
+ newHeight = (int)(newWidth/ratio);
}
m_containment->resize(QSize(newWidth, newHeight));
m_applet->setGeometry(QRectF(QPoint(0, 0), QSize(newWidth, newHeight)));
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic