SkyGui.cpp   SkyGui.cpp 
skipping to change at line 34 skipping to change at line 34
#include "StelGui.hpp" #include "StelGui.hpp"
#include "StelCore.hpp" #include "StelCore.hpp"
#include "StelMainView.hpp" #include "StelMainView.hpp"
#include <QGraphicsView> #include <QGraphicsView>
#include <QDebug> #include <QDebug>
#include <QTimeLine> #include <QTimeLine>
#include <QGraphicsSceneMouseEvent> #include <QGraphicsSceneMouseEvent>
#include <QSettings> #include <QSettings>
#include <QTextDocument> #include <QTextDocument>
#ifdef _MSC_BUILD
#define round(dbl) dbl >= 0.0 ? (int)(dbl + 0.5) : ((dbl - (double)(int)dbl
) <= -0.5 ? (int)dbl : (int)(dbl - 0.5))
#endif
InfoPanel::InfoPanel(QGraphicsItem* parent) : QGraphicsTextItem("", parent) InfoPanel::InfoPanel(QGraphicsItem* parent) : QGraphicsTextItem("", parent)
{ {
QSettings* conf = StelApp::getInstance().getSettings(); QSettings* conf = StelApp::getInstance().getSettings();
Q_ASSERT(conf); Q_ASSERT(conf);
QString objectInfo = conf->value("gui/selected_object_info", "all"). toString(); QString objectInfo = conf->value("gui/selected_object_info", "all"). toString();
if (objectInfo == "all") if (objectInfo == "all")
{ {
infoTextFilters = StelObject::InfoStringGroup(StelObject::Al lInfo); infoTextFilters = StelObject::InfoStringGroup(StelObject::Al lInfo);
} }
else if (objectInfo == "short") else if (objectInfo == "short")
skipping to change at line 266 skipping to change at line 262
const int ww = getSkyGuiWidth(); const int ww = getSkyGuiWidth();
const int hh = getSkyGuiHeight(); const int hh = getSkyGuiHeight();
bool updatePath = false; bool updatePath = false;
// Use a position cache to avoid useless redraw triggered by the pos ition set if the bars don't move // Use a position cache to avoid useless redraw triggered by the pos ition set if the bars don't move
double rangeX = winBar->boundingRectNoHelpLabel().width()+2.*buttonB arPath->getRoundSize()+1.; double rangeX = winBar->boundingRectNoHelpLabel().width()+2.*buttonB arPath->getRoundSize()+1.;
const qreal newWinBarX = buttonBarPath->getRoundSize()-(1.-animLeftB arTimeLine->currentValue())*rangeX-0.5; const qreal newWinBarX = buttonBarPath->getRoundSize()-(1.-animLeftB arTimeLine->currentValue())*rangeX-0.5;
const qreal newWinBarY = hh-winBar->boundingRectNoHelpLabel().height ()-buttonBar->boundingRectNoHelpLabel().height()-20; const qreal newWinBarY = hh-winBar->boundingRectNoHelpLabel().height ()-buttonBar->boundingRectNoHelpLabel().height()-20;
if (winBar->pos().x()!=newWinBarX || winBar->pos().y()!=newWinBarY) if (winBar->pos().x()!=newWinBarX || winBar->pos().y()!=newWinBarY)
{ {
winBar->setPos(round(newWinBarX), round(newWinBarY)); winBar->setPos(qRound(newWinBarX), qRound(newWinBarY));
updatePath = true; updatePath = true;
} }
double rangeY = buttonBar->boundingRectNoHelpLabel().height()+0.5-7. -buttonBarPath->getRoundSize(); double rangeY = buttonBar->boundingRectNoHelpLabel().height()+0.5-7. -buttonBarPath->getRoundSize();
const qreal newButtonBarX = winBar->boundingRectNoHelpLabel().right( )+buttonBarPath->getRoundSize(); const qreal newButtonBarX = winBar->boundingRectNoHelpLabel().right( )+buttonBarPath->getRoundSize();
const qreal newButtonBarY = hh-buttonBar->boundingRectNoHelpLabel(). height()-buttonBarPath->getRoundSize()+0.5+(1.-animBottomBarTimeLine->curre ntValue())*rangeY; const qreal newButtonBarY = hh-buttonBar->boundingRectNoHelpLabel(). height()-buttonBarPath->getRoundSize()+0.5+(1.-animBottomBarTimeLine->curre ntValue())*rangeY;
if (buttonBar->pos().x()!=newButtonBarX || buttonBar->pos().y()!=new ButtonBarY) if (buttonBar->pos().x()!=newButtonBarX || buttonBar->pos().y()!=new ButtonBarY)
{ {
buttonBar->setPos(round(newButtonBarX), round(newButtonBarY) ); buttonBar->setPos(qRound(newButtonBarX), qRound(newButtonBar Y));
updatePath = true; updatePath = true;
} }
if (lastButtonbarWidth != buttonBar->boundingRectNoHelpLabel().width ()) if (lastButtonbarWidth != buttonBar->boundingRectNoHelpLabel().width ())
{ {
updatePath = true; updatePath = true;
lastButtonbarWidth = (int)(buttonBar->boundingRectNoHelpLabe l().width()); lastButtonbarWidth = (int)(buttonBar->boundingRectNoHelpLabe l().width());
} }
if (updatePath) if (updatePath)
 End of changes. 3 change blocks. 
7 lines changed or deleted 2 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/