"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/GUI/GettingStartedTipsController.cxx" between
flightgear-2020.3.7.tar.bz2 and flightgear-2020.3.8.tar.bz2

About: FlightGear is a multi-platform, cooperative flight simulator development project.

GettingStartedTipsController.cxx  (flightgear-2020.3.7.tar.bz2):GettingStartedTipsController.cxx  (flightgear-2020.3.8.tar.bz2)
skipping to change at line 46 skipping to change at line 46
static std::initializer_list<TipGeometryByArrowLocation> static_tipGeometries = { static std::initializer_list<TipGeometryByArrowLocation> static_tipGeometries = {
{GettingStartedTip::Arrow::BottomRight, QRectF{rightSideOffset, 0.0, tipBoxW idth, dummyHeight}, Qt::AlignBottom}, {GettingStartedTip::Arrow::BottomRight, QRectF{rightSideOffset, 0.0, tipBoxW idth, dummyHeight}, Qt::AlignBottom},
{GettingStartedTip::Arrow::BottomCenter, QRectF{halfBoxWidth, 0.0, tipBoxWid th, dummyHeight}, Qt::AlignBottom}, {GettingStartedTip::Arrow::BottomCenter, QRectF{halfBoxWidth, 0.0, tipBoxWid th, dummyHeight}, Qt::AlignBottom},
{GettingStartedTip::Arrow::TopCenter, QRectF{-halfBoxWidth, 0.0, tipBoxWidth , dummyHeight}, Qt::AlignTop}, {GettingStartedTip::Arrow::TopCenter, QRectF{-halfBoxWidth, 0.0, tipBoxWidth , dummyHeight}, Qt::AlignTop},
{GettingStartedTip::Arrow::TopRight, QRectF{rightSideOffset, 0.0, tipBoxWidt h, dummyHeight}, Qt::AlignTop}, {GettingStartedTip::Arrow::TopRight, QRectF{rightSideOffset, 0.0, tipBoxWidt h, dummyHeight}, Qt::AlignTop},
{GettingStartedTip::Arrow::TopLeft, QRectF{-arrowSideOffset, 0.0, tipBoxWidt h, dummyHeight}, Qt::AlignTop}, {GettingStartedTip::Arrow::TopLeft, QRectF{-arrowSideOffset, 0.0, tipBoxWidt h, dummyHeight}, Qt::AlignTop},
{GettingStartedTip::Arrow::LeftCenter, QRectF{0.0, 0.0, tipBoxWidth, dummyHe ight}, Qt::AlignVCenter}, {GettingStartedTip::Arrow::LeftCenter, QRectF{0.0, 0.0, tipBoxWidth, dummyHe ight}, Qt::AlignVCenter},
{GettingStartedTip::Arrow::RightCenter, QRectF{-(tipBoxWidth + TipBackground Box::arrowHeight()), 0.0, tipBoxWidth, dummyHeight}, Qt::AlignVCenter}, {GettingStartedTip::Arrow::RightCenter, QRectF{-(tipBoxWidth + TipBackground Box::arrowHeight()), 0.0, tipBoxWidth, dummyHeight}, Qt::AlignVCenter},
{GettingStartedTip::Arrow::LeftTop, QRectF{0.0, topHeightOffset, tipBoxWidth , dummyHeight}, Qt::AlignTop}, {GettingStartedTip::Arrow::LeftTop, QRectF{0.0, topHeightOffset, tipBoxWidth , dummyHeight}, Qt::AlignTop},
{GettingStartedTip::Arrow::NoArrow, QRectF{-halfBoxWidth, 0.0, tipBoxWidth, dummyHeight}, Qt::AlignVCenter},
}; };
/** /**
* @brief The GettingStartedTipsController::ItemPositionObserver class * @brief The GettingStartedTipsController::ItemPositionObserver class
* *
* This is a helper to observe the full position (and in the future, transform i f required) * This is a helper to observe the full position (and in the future, transform i f required)
* of a QQuickItem, so we can update a signal when the on-screen position change s. This * of a QQuickItem, so we can update a signal when the on-screen position change s. This
* is necessary to re-transform the tooltip location if the item it's 'attached' to * is necessary to re-transform the tooltip location if the item it's 'attached' to
* moves, or some ancestor does. * moves, or some ancestor does.
skipping to change at line 341 skipping to change at line 342
{ {
return tg.arrow == arrow; return tg.arrow == arrow;
}); });
if (it == static_tipGeometries.end()) { if (it == static_tipGeometries.end()) {
qWarning() << Q_FUNC_INFO << "Missing tip geometry" << arrow; qWarning() << Q_FUNC_INFO << "Missing tip geometry" << arrow;
return {}; return {};
} }
QRectF g = it->geometry; QRectF g = it->geometry;
if ((arrow == GettingStartedTip::Arrow::LeftCenter) || (arrow == GettingStar if ((arrow == GettingStartedTip::Arrow::LeftCenter)
tedTip::Arrow::RightCenter) || (arrow == GettingStartedTip::Arrow::RightCenter)
|| (arrow == GettingStartedTip::Arrow::LeftTop)) { || (arrow == GettingStartedTip::Arrow::LeftTop)
|| (arrow == GettingStartedTip::Arrow::NoArrow))
{
g.setHeight(_activeTipHeight); g.setHeight(_activeTipHeight);
} else { } else {
g.setHeight(_activeTipHeight + TipBackgroundBox::arrowHeight()); g.setHeight(_activeTipHeight + TipBackgroundBox::arrowHeight());
} }
switch (it->verticalAlignment) { switch (it->verticalAlignment) {
case Qt::AlignBottom: case Qt::AlignBottom:
g.moveBottom(0); g.moveBottom(0);
break; break;
 End of changes. 2 change blocks. 
3 lines changed or deleted 6 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)