mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-13 16:18:42 +00:00
Less jarring use of pixmaps in look and feel.
This commit is contained in:
@@ -275,7 +275,8 @@ AllPlotWindow::AllPlotWindow(MainWindow *mainWindow) :
|
||||
fullPlot = new AllPlot(this, mainWindow);
|
||||
fullPlot->setInstanceName("fullPlot");
|
||||
fullPlot->grid->enableY(false);
|
||||
fullPlot->setCanvasBackground(GColor(CPLOTTHUMBNAIL));
|
||||
QPalette def;
|
||||
fullPlot->setCanvasBackground(def.color(QPalette::Window));
|
||||
fullPlot->setCanvasLineWidth(0);
|
||||
fullPlot->enableAxis(QwtPlot::yLeft, false);
|
||||
fullPlot->enableAxis(QwtPlot::yLeft2, false);
|
||||
|
||||
@@ -149,6 +149,7 @@ GcWindow::paintEvent(QPaintEvent *event)
|
||||
static QPixmap aluBarDark = QPixmap(":images/aluBarDark.png");
|
||||
static QPixmap aluLight = QPixmap(":images/aluLight.jpg");
|
||||
static QPixmap carbon = QPixmap(":images/carbon.jpg");
|
||||
static QPalette defaultPalette;
|
||||
|
||||
if (contentsMargins().top() > 0) {
|
||||
// draw a rectangle in the contents margins
|
||||
@@ -159,7 +160,8 @@ GcWindow::paintEvent(QPaintEvent *event)
|
||||
|
||||
// background light gray for now?
|
||||
QRect all(0,0,width(),height());
|
||||
painter.drawTiledPixmap(all, aluLight);
|
||||
//painter.drawTiledPixmap(all, aluLight);
|
||||
painter.fillRect(all, defaultPalette.color(QPalette::Window));
|
||||
|
||||
// fill in the title bar
|
||||
QRect bar(0,0,width(),contentsMargins().top());
|
||||
@@ -201,7 +203,7 @@ GcWindow::paintEvent(QPaintEvent *event)
|
||||
if (property("isManager").toBool() == true) {
|
||||
painter.drawTiledPixmap(all, carbon);
|
||||
} else {
|
||||
painter.drawTiledPixmap(all, aluLight);
|
||||
//painter.drawTiledPixmap(all, aluLight);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -188,12 +188,13 @@ MainWindow::MainWindow(const QDir &home) :
|
||||
setGeometry(geom.toRect());
|
||||
|
||||
toolbar = new QToolBar(this);
|
||||
toolbar->setToolButtonStyle(Qt::ToolButtonTextUnderIcon);
|
||||
//toolbar->setToolButtonStyle(Qt::ToolButtonTextUnderIcon);
|
||||
toolbar->setToolButtonStyle(Qt::ToolButtonIconOnly);
|
||||
toolbar->setFloatable(false);
|
||||
toolbar->setIconSize(QSize(32,32));
|
||||
#ifndef Q_OS_MAC
|
||||
toolbar->setAutoFillBackground(false);
|
||||
toolbar->setStyleSheet("background-image: url(\":/images/aluLight.jpg\"); border: 0px;");
|
||||
//toolbar->setAutoFillBackground(false);
|
||||
//toolbar->setStyleSheet("background-image: url(\":/images/aluLight.jpg\"); border: 0px;");
|
||||
toolbar->setContentsMargins(0,0,0,0);
|
||||
#else
|
||||
QIcon tickIcon(":images/toolbar/main/tick.png");
|
||||
|
||||
Reference in New Issue
Block a user