Less jarring use of pixmaps in look and feel.

This commit is contained in:
Mark Liversedge
2011-04-18 22:48:49 +01:00
parent 15741d6017
commit ec3c7a2b5a
3 changed files with 10 additions and 6 deletions

View File

@@ -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);

View File

@@ -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);
}
}
}

View File

@@ -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");