Skip to content

Commit

Permalink
Remove custom painting of the top bar background
Browse files Browse the repository at this point in the history
Themes can use QSS if they want something special.

See longturn#940.
  • Loading branch information
lmoureaux committed Mar 25, 2022
1 parent 167257f commit e8e8b53
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 25 deletions.
21 changes: 0 additions & 21 deletions client/gui-qt/top_bar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -325,27 +325,6 @@ void top_bar::addWidget(top_bar_widget *fsw)
layout->addWidget(fsw);
}

/**
Paint event for top_bar
*/
void top_bar::paintEvent(QPaintEvent *event)
{
QPainter painter;

painter.begin(this);
paint(&painter, event);
painter.end();
}

/**
Paints dark rectangle as background for top_bar
*/
void top_bar::paint(QPainter *painter, QPaintEvent *event)
{
painter->setBrush(QBrush(QColor(14, 14, 14)));
painter->drawRect(event->rect());
}

/**
Callback to show map
*/
Expand Down
4 changes: 0 additions & 4 deletions client/gui-qt/top_bar.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,8 @@ class top_bar : public QWidget {
top_bar();
~top_bar() override;
void addWidget(top_bar_widget *fsw);
void paint(QPainter *painter, QPaintEvent *event);
QList<top_bar_widget *> objects;

protected:
void paintEvent(QPaintEvent *event) override;

private:
QHBoxLayout *layout;
};

0 comments on commit e8e8b53

Please sign in to comment.