mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-13 16:18:42 +00:00
Windows: Toolbar tweaks
.. menubar color .. toolbar smaller since contains menu bar
This commit is contained in:
@@ -20,7 +20,11 @@
|
||||
|
||||
GcToolBar::GcToolBar(QWidget *parent) : QWidget(parent)
|
||||
{
|
||||
#ifdef WIN32
|
||||
setFixedHeight(40);
|
||||
#else
|
||||
setFixedHeight(50);
|
||||
#endif
|
||||
setContentsMargins(0,0,0,0);
|
||||
layout = new QHBoxLayout(this);
|
||||
layout->setSpacing(10);
|
||||
@@ -72,7 +76,9 @@ GcToolBar::paintBackground(QPaintEvent *)
|
||||
painter.setPen(black);
|
||||
painter.drawLine(0,height()-1, width()-1, height()-1);
|
||||
|
||||
#ifndef WIN32 // not on windows clashes with menu
|
||||
QPen gray(QColor(230,230,230));
|
||||
painter.setPen(gray);
|
||||
painter.drawLine(0,0, width()-1, 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -796,6 +796,11 @@ MainWindow::MainWindow(const QDir &home) :
|
||||
/*----------------------------------------------------------------------
|
||||
* Application Menus
|
||||
*--------------------------------------------------------------------*/
|
||||
#ifdef WIN32
|
||||
menuBar()->setStyleSheet("QMenuBar { background: rgba(225,225,225); }"
|
||||
"QMenuBar::item { background: rgba(225,225,225); }");
|
||||
menuBar()->setContentsMargins(0,0,0,0);
|
||||
#endif
|
||||
|
||||
QMenu *fileMenu = menuBar()->addMenu(tr("&Athlete"));
|
||||
fileMenu->addAction(tr("&New..."), this, SLOT(newCyclist()), tr("Ctrl+N"));
|
||||
|
||||
Reference in New Issue
Block a user