mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-14 00:28:42 +00:00
Simplify and Clean UI
Less jarring UI with simple use of color and no pixmaps to make a clean look. Will need more work to get consistent across the code base. A simple and clean UI is starting to emerge.
This commit is contained in:
@@ -276,7 +276,8 @@ AllPlotWindow::AllPlotWindow(MainWindow *mainWindow) :
|
||||
fullPlot->setInstanceName("fullPlot");
|
||||
fullPlot->grid->enableY(false);
|
||||
QPalette def;
|
||||
fullPlot->setCanvasBackground(def.color(QPalette::Window));
|
||||
//fullPlot->setCanvasBackground(def.color(QPalette::Window));
|
||||
fullPlot->setCanvasBackground(Qt::white);
|
||||
fullPlot->setCanvasLineWidth(0);
|
||||
fullPlot->enableAxis(QwtPlot::yLeft, false);
|
||||
fullPlot->enableAxis(QwtPlot::yLeft2, false);
|
||||
|
||||
@@ -170,17 +170,18 @@ GcWindow::paintEvent(QPaintEvent * /*event*/)
|
||||
// background light gray for now?
|
||||
QRect all(0,0,width(),height());
|
||||
//painter.drawTiledPixmap(all, aluLight);
|
||||
painter.fillRect(all, defaultPalette.color(QPalette::Window));
|
||||
//painter.fillRect(all, defaultPalette.color(QPalette::Window));
|
||||
painter.fillRect(all, Qt::white);
|
||||
|
||||
// fill in the title bar
|
||||
QRect bar(0,0,width(),contentsMargins().top());
|
||||
QColor bg;
|
||||
if (property("active").toBool() == true) {
|
||||
bg = GColor(CTILEBARSELECT);
|
||||
painter.drawPixmap(bar, aluBarDark);
|
||||
painter.drawPixmap(bar, aluBar);
|
||||
} else {
|
||||
bg = GColor(CTILEBAR);
|
||||
painter.drawPixmap(bar, aluBar);
|
||||
painter.drawPixmap(bar, aluBarDark);
|
||||
}
|
||||
|
||||
|
||||
@@ -210,7 +211,8 @@ GcWindow::paintEvent(QPaintEvent * /*event*/)
|
||||
QPainter painter(this);
|
||||
QRect all(0,0,width(),height());
|
||||
if (property("isManager").toBool() == true) {
|
||||
painter.drawTiledPixmap(all, carbon);
|
||||
//painter.drawTiledPixmap(all, carbon);
|
||||
painter.fillRect(all, QColor("#A8A8A8"));
|
||||
} else {
|
||||
//painter.drawTiledPixmap(all, aluLight);
|
||||
}
|
||||
|
||||
@@ -79,7 +79,8 @@ HomeWindow::HomeWindow(MainWindow *mainWindow, QString name, QString windowtitle
|
||||
layout->addWidget(style);
|
||||
|
||||
QPalette palette;
|
||||
palette.setBrush(backgroundRole(), QBrush(QImage(":/images/carbon.jpg")));
|
||||
//palette.setBrush(backgroundRole(), QBrush(QImage(":/images/carbon.jpg")));
|
||||
palette.setBrush(backgroundRole(), QColor("#A8A8A8"));
|
||||
|
||||
// each style has its own container widget
|
||||
tabbed = new QTabWidget(this);
|
||||
|
||||
@@ -121,8 +121,8 @@ MainWindow::MainWindow(const QDir &home) :
|
||||
pal.setColor(QPalette::Button, GColor(CTOOLBAR));
|
||||
pal.setColor(QPalette::WindowText, Qt::white); //XXX should be black/white for CTOOLBAR
|
||||
statusBar()->setPalette(pal);
|
||||
#endif
|
||||
statusBar()->showMessage(tr("Ready"));
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
* Athlete details
|
||||
@@ -184,6 +184,7 @@ MainWindow::MainWindow(const QDir &home) :
|
||||
#ifndef Q_OS_MAC
|
||||
toolbar->setContentsMargins(0,0,0,0);
|
||||
toolbar->setAutoFillBackground(true);
|
||||
toolbar->setStyleSheet("background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #CFCFCF, stop: 1.0 #A8A8A8);");
|
||||
#if 0
|
||||
toolbar->setPalette(pal);
|
||||
#endif
|
||||
@@ -320,10 +321,6 @@ MainWindow::MainWindow(const QDir &home) :
|
||||
}
|
||||
|
||||
splitter = new QSplitter;
|
||||
splitter->setHandleWidth(2);
|
||||
splitter->setFrameStyle(QFrame::NoFrame);
|
||||
splitter->setStyleSheet("QSplitter::handle { color: black; }");
|
||||
splitter->setContentsMargins(0, 0, 0, 0); // attempting to follow some UI guides
|
||||
|
||||
// CHARTS
|
||||
chartTool = new GcWindowTool(this);
|
||||
@@ -331,10 +328,15 @@ MainWindow::MainWindow(const QDir &home) :
|
||||
// TOOLBOX
|
||||
toolBox = new QToolBox(this);
|
||||
toolBox->setStyleSheet("QToolBox::tab {"
|
||||
"background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,"
|
||||
"stop: 0 #FFFFFF, stop: 0.5 #DDDDDD,"
|
||||
"stop: 0.6 #D8D8D8, stop: 1.0 #CCCCCC);"
|
||||
#if 0
|
||||
"background-image: url(:images/aluToolBar.png);"
|
||||
"background-position: top right;"
|
||||
"background-origin: content;"
|
||||
"background-repeat: repeat-x;"
|
||||
#endif
|
||||
"max-height: 18px; "
|
||||
"background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,"
|
||||
"stop: 0 #CFCFCF, stop: 1.0 #A8A8A8);"
|
||||
"color: #535353;"
|
||||
"font-weight: bold; }");
|
||||
|
||||
@@ -442,8 +444,11 @@ MainWindow::MainWindow(const QDir &home) :
|
||||
sizes.append(390);
|
||||
splitter->setSizes(sizes);
|
||||
}
|
||||
splitter->setHandleWidth(2); // gets munged by restore state from older versions
|
||||
splitter->setChildrenCollapsible(false); // QT BUG crash QTextLayout do not undo this
|
||||
splitter->setHandleWidth(1);
|
||||
splitter->setFrameStyle(QFrame::NoFrame);
|
||||
splitter->setStyleSheet("QSplitter { border: 0px; background-color: #A8A8A8; }");
|
||||
splitter->setContentsMargins(0, 0, 0, 0); // attempting to follow some UI guides
|
||||
setCentralWidget(splitter);
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
@@ -579,9 +584,11 @@ MainWindow::rideTreeWidgetSelectionChanged()
|
||||
ride = (RideItem*) which;
|
||||
}
|
||||
|
||||
#if 0
|
||||
// update the status bar
|
||||
if (!ride) statusBar()->showMessage(tr("No ride selected"));
|
||||
else statusBar()->showMessage(ride->dateTime.toString("ddd MMM d, yyyy h:mm AP")); // same format as ride list
|
||||
#endif
|
||||
|
||||
// update the ride property on all widgets
|
||||
// to let them know they need to replot new
|
||||
|
||||
@@ -69,6 +69,14 @@ RideNavigator::RideNavigator(MainWindow *parent) : main(parent), active(false),
|
||||
//tableView->setFont(smaller);
|
||||
tableView->installEventFilter(this);
|
||||
tableView->setFrameStyle(QFrame::NoFrame);
|
||||
|
||||
#if 0
|
||||
tableView->header()->setStyleSheet( "::section { background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,"
|
||||
"stop: 0 #CFCFCF, stop: 1.0 #A8A8A8);"
|
||||
"border: 2px; border-color: #A8A8A8; "
|
||||
"color: #535353;"
|
||||
"font-weight: bold; }");
|
||||
#endif
|
||||
tableView->show();
|
||||
|
||||
// this maps friendly names to metric names
|
||||
|
||||
@@ -44,6 +44,7 @@ RideSummaryWindow::RideSummaryWindow(MainWindow *mainWindow) :
|
||||
vlayout->setContentsMargins(10,10,10,10);
|
||||
rideSummary = new QTextEdit(this);
|
||||
rideSummary->setReadOnly(true);
|
||||
rideSummary->setFrameStyle(QFrame::NoFrame);
|
||||
vlayout->addWidget(rideSummary);
|
||||
|
||||
QFont font;
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
<file>images/toolbar/main/measures.png</file>
|
||||
<file>images/toolbar/main/train.png</file>
|
||||
<file>images/aluBar.png</file>
|
||||
<file>images/aluToolBar.png</file>
|
||||
<file>images/aluBarDark.png</file>
|
||||
<file>images/aluLight.jpg</file>
|
||||
<file>images/carbon.jpg</file>
|
||||
|
||||
BIN
src/images/aluToolBar.png
Normal file
BIN
src/images/aluToolBar.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.5 KiB |
Reference in New Issue
Block a user