diff --git a/CHANGELOG.md b/CHANGELOG.md index b83b9b1f1..b342396a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ +infobox: show an icon for warnings import: allow import of divesites without UUID profile: implement panning of the profile planner: allow handle manipulation in zoomed in state diff --git a/profile-widget/diveeventitem.cpp b/profile-widget/diveeventitem.cpp index b713b01a1..6e864b069 100644 --- a/profile-widget/diveeventitem.cpp +++ b/profile-widget/diveeventitem.cpp @@ -170,7 +170,7 @@ void DiveEventItem::setupToolTipString(struct gasmix lastgasmix) name += ev->flags & SAMPLE_FLAGS_BEGIN ? tr(" begin", "Starts with space!") : ev->flags & SAMPLE_FLAGS_END ? tr(" end", "Starts with space!") : ""; } - setToolTip(name); + setToolTip(QString("  ") + name); } void DiveEventItem::eventVisibilityChanged(const QString&, bool) diff --git a/profile-widget/divetooltipitem.cpp b/profile-widget/divetooltipitem.cpp index 6696bfa17..e630c2228 100644 --- a/profile-widget/divetooltipitem.cpp +++ b/profile-widget/divetooltipitem.cpp @@ -26,9 +26,10 @@ void ToolTipItem::addToolTip(const QString &toolTip, const QPixmap &pixmap) const int sp2 = iconMetrics.spacing * 2; iconItem->setPos(sp2, yValue); - QGraphicsSimpleTextItem *textItem = new QGraphicsSimpleTextItem(toolTip, this); + QGraphicsTextItem *textItem = new QGraphicsTextItem(this); + textItem->setHtml(toolTip); textItem->setPos(sp2 + iconMetrics.sz_small + sp2, yValue); - textItem->setBrush(QBrush(Qt::white)); + textItem->setDefaultTextColor(Qt::white); textItem->setFlag(ItemIgnoresTransformations); toolTips.push_back(qMakePair(iconItem, textItem)); } @@ -251,7 +252,7 @@ void ToolTipItem::refresh(const dive *d, const QPointF &pos, bool inPlanner) painter.setPen(QColor(0, 0, 0, 127)); for (int i = 0; i < 16; i++) painter.drawLine(i, 60, i, 60 - entry->percentages[i] / 2); - entryToolTip.second->setText(QString::fromUtf8(mb.buffer, mb.len)); + entryToolTip.second->setPlainText(QString::fromUtf8(mb.buffer, mb.len)); } entryToolTip.first->setPixmap(tissues); diff --git a/profile-widget/divetooltipitem.h b/profile-widget/divetooltipitem.h index aa7155463..622615747 100644 --- a/profile-widget/divetooltipitem.h +++ b/profile-widget/divetooltipitem.h @@ -45,7 +45,7 @@ slots: void setRect(const QRectF &rect); private: - typedef QPair ToolTip; + typedef QPair ToolTip; QVector toolTips; ToolTip entryToolTip; QGraphicsSimpleTextItem *title;