Used different font sizes for top and bottom annotation items
This commit is contained in:
@@ -41,6 +41,10 @@ void AnnotationItem::paint(QPainter* painter, const QStyleOptionGraphicsItem* op
|
||||
auto lineColor = this->getLineColor();
|
||||
auto labelFontColor = this->getLabelFontColor();
|
||||
|
||||
auto font = painter->font();
|
||||
font.setPixelSize(this->getLabelFontSize());
|
||||
painter->setFont(font);
|
||||
|
||||
const auto isEnabled = this->isEnabled();
|
||||
|
||||
lineColor.setAlpha(isEnabled ? 255 : 100);
|
||||
|
||||
@@ -57,6 +57,9 @@ namespace Bloom::Widgets
|
||||
[[nodiscard]] virtual QColor getLabelFontColor() const {
|
||||
return QColor(0x68, 0x68, 0x68);
|
||||
}
|
||||
|
||||
[[nodiscard]] virtual int getLabelFontSize() const {
|
||||
return 12;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -24,6 +24,10 @@ namespace Bloom::Widgets
|
||||
return QColor(0x94, 0x6F, 0x30);
|
||||
}
|
||||
|
||||
[[nodiscard]] int getLabelFontSize() const override {
|
||||
return 11;
|
||||
}
|
||||
|
||||
private:
|
||||
static constexpr auto DEFAULT_LABEL_TEXT = "??";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user