marker: Store color as int.

This commit is contained in:
Thomas Wilshaw
2021-10-22 22:15:49 +01:00
parent d068e9db11
commit 9a2b669c9f
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -31,7 +31,7 @@ namespace olive {
Marker::Marker(QWidget *parent) :
QWidget(parent),
marker_color_(Qt::green)
marker_color_(7) //green FIXME: add default color to config
{
setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
setMinimumSize(20, 20);
@@ -62,7 +62,7 @@ void Marker::paintEvent(QPaintEvent *event)
QPainter p(this);
p.setPen(Qt::black);
p.setBrush(marker_color_);
p.setBrush(ColorCoding::GetColor(marker_color_).toQColor());
p.setRenderHint(QPainter::Antialiasing);
@@ -92,7 +92,7 @@ void Marker::ShowContextMenu() {
void Marker::SetColor(int c)
{
marker_color_ = ColorCoding::GetColor(c).toQColor();
marker_color_ = c;
update();
}
+1 -1
View File
@@ -46,7 +46,7 @@ class Marker : public QWidget {
private:
ColorLabelMenu* color_coding_menu_;
QColor marker_color_;
int marker_color_;
private slots:
void ShowContextMenu();