mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-14 00:28:42 +00:00
Make toolbar color configurable
Not generally useful but allows one to make the toolbar menu and titlebar match for a more pleasing general effect. Most users will not use this I imagine and use the default window colors.
This commit is contained in:
@@ -175,6 +175,12 @@ MainWindow::MainWindow(const QDir &home) :
|
||||
#ifndef Q_OS_MAC
|
||||
toolbar->setContentsMargins(0,0,0,0);
|
||||
toolbar->setAutoFillBackground(true);
|
||||
QPalette pal;
|
||||
//pal.setColor(QPalette::Button, QColor(60,59,55));
|
||||
pal.setColor(QPalette::Window, GColor(CTOOLBAR));
|
||||
pal.setColor(QPalette::Button, GColor(CTOOLBAR));
|
||||
toolbar->setPalette(pal);
|
||||
toolbar->setMovable(false);
|
||||
#else
|
||||
QIcon tickIcon(":images/toolbar/main/tick.png");
|
||||
QPushButton *showControls = new QPushButton(tickIcon, "", this);
|
||||
@@ -1547,6 +1553,14 @@ MainWindow::notifyConfigChanged()
|
||||
QMessageBox::warning(this, tr("Reading HR Zones File"), hrzones_->warningString());
|
||||
}
|
||||
|
||||
// update the toolbar color if not Mac
|
||||
#ifndef Q_OS_MAC
|
||||
QPalette pal;
|
||||
pal.setColor(QPalette::Window, GColor(CTOOLBAR));
|
||||
pal.setColor(QPalette::Button, GColor(CTOOLBAR));
|
||||
toolbar->setPalette(pal);
|
||||
#endif
|
||||
|
||||
// now tell everyone else
|
||||
configChanged();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user