mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-13 16:18:42 +00:00
Julian Candy
This commit is contained in:
@@ -121,6 +121,9 @@ void
|
||||
GcWindow::paintEvent(QPaintEvent * /*event*/)
|
||||
{
|
||||
static QPixmap closeImage = QPixmap(":images/toolbar/popbutton.png");
|
||||
static QPixmap aluBar = QPixmap(":images/aluBar.png");
|
||||
static QPixmap aluBarDark = QPixmap(":images/aluBarDark.png");
|
||||
static QPixmap aluLight = QPixmap(":images/aluLight.jpg");
|
||||
|
||||
if (contentsMargins().top() > 0) {
|
||||
// draw a rectangle in the contents margins
|
||||
@@ -129,15 +132,21 @@ GcWindow::paintEvent(QPaintEvent * /*event*/)
|
||||
// setup a painter and the area to paint
|
||||
QPainter painter(this);
|
||||
|
||||
// background light gray for now?
|
||||
QRect all(0,0,width(),height());
|
||||
painter.drawTiledPixmap(all, aluLight);
|
||||
|
||||
// fill in the title bar
|
||||
QRect bar(0,0,width(),contentsMargins().top());
|
||||
QColor bg;
|
||||
if (property("active").toBool() == true)
|
||||
if (property("active").toBool() == true) {
|
||||
bg = GColor(CTILEBARSELECT);
|
||||
else
|
||||
painter.drawPixmap(bar, aluBarDark);
|
||||
} else {
|
||||
bg = GColor(CTILEBAR);
|
||||
painter.drawPixmap(bar, aluBar);
|
||||
}
|
||||
|
||||
painter.fillRect(bar, bg);
|
||||
|
||||
// heading
|
||||
QFont font;
|
||||
|
||||
@@ -28,6 +28,12 @@ HomeWindow::HomeWindow(MainWindow *mainWindow) :
|
||||
|
||||
QVBoxLayout *layout = new QVBoxLayout(this);
|
||||
|
||||
#if 0
|
||||
QPalette mypalette;
|
||||
mypalette.setBrush(this->backgroundRole(), QBrush(QImage(":/images/dark.jpg")));
|
||||
setPalette(mypalette);
|
||||
#endif
|
||||
|
||||
QFont bigandbold;
|
||||
bigandbold.setPointSize(bigandbold.pointSize() + 2);
|
||||
bigandbold.setWeight(QFont::Bold);
|
||||
@@ -87,12 +93,14 @@ HomeWindow::HomeWindow(MainWindow *mainWindow) :
|
||||
|
||||
winWidget = new QWidget(this);
|
||||
winWidget->setContentsMargins(0,0,0,0);
|
||||
QPalette palette;
|
||||
palette.setBrush(winWidget->backgroundRole(), QBrush(QImage(":/images/carbon.jpg")));
|
||||
winWidget->setPalette(palette);
|
||||
//tileWidget->setMouseTracking(true);
|
||||
//tileWidget->installEventFilter(this);
|
||||
|
||||
winFlow = new GcWindowLayout(winWidget);
|
||||
winFlow->setSpacing(0);
|
||||
winFlow->setContentsMargins(0,0,0,0);
|
||||
winFlow = new GcWindowLayout(winWidget, 0, 20, 20);
|
||||
winFlow->setContentsMargins(20,20,20,20);
|
||||
|
||||
winArea = new QScrollArea(this);
|
||||
winArea->setWidgetResizable(true);
|
||||
@@ -349,9 +357,10 @@ HomeWindow::addChart(GcWindow* newone)
|
||||
(2*(winArea->contentsMargins().left()+winArea->contentsMargins().right()))
|
||||
- ((2*widthFactor) * 6) ) / widthFactor;
|
||||
#else
|
||||
int newwidth = (winArea->width() - 20 -
|
||||
(2*(winArea->contentsMargins().left()+winArea->contentsMargins().right()))
|
||||
- ((1+widthFactor) * 5) ) / widthFactor;
|
||||
int newwidth = (winArea->width() - 20 /* scrollbar */
|
||||
- 40 /* left and right marings */
|
||||
- ((widthFactor-1) * 20) /* internal spacing */
|
||||
) / widthFactor;
|
||||
#endif
|
||||
|
||||
int newheight = (winArea->height() -
|
||||
@@ -451,9 +460,10 @@ HomeWindow::resizeEvent(QResizeEvent *)
|
||||
(2*(winArea->contentsMargins().left()+winArea->contentsMargins().right()))
|
||||
- ((2*widthFactor) * 6) ) / widthFactor;
|
||||
#else
|
||||
int newwidth = (winArea->width() - 20 -
|
||||
(2*(winArea->contentsMargins().left()+winArea->contentsMargins().right()))
|
||||
- ((1+widthFactor) * 5) ) / widthFactor;
|
||||
int newwidth = (winArea->width() - 20 /* scrollbar */
|
||||
- 40 /* left and right marings */
|
||||
- ((widthFactor-1) * 20) /* internal spacing */
|
||||
) / widthFactor;
|
||||
#endif
|
||||
int newheight = (winArea->height() -
|
||||
(winArea->contentsMargins().left()+winArea->contentsMargins().right())
|
||||
|
||||
@@ -139,7 +139,7 @@ MainWindow::MainWindow(const QDir &home) :
|
||||
"QTabWidget { background = Qt::white; };"
|
||||
"::pane { FrameStyle = QFrame::NoFrame; border: 0px; };");
|
||||
|
||||
setContentsMargins(10,10,10,10);
|
||||
setContentsMargins(0,0,0,0);
|
||||
|
||||
QVariant unit = appsettings->value(this, GC_UNIT);
|
||||
useMetricUnits = (unit.toString() == "Metric");
|
||||
|
||||
@@ -9,6 +9,11 @@
|
||||
<file>images/toolbar/main/home.png</file>
|
||||
<file>images/toolbar/main/measures.png</file>
|
||||
<file>images/toolbar/main/train.png</file>
|
||||
<file>images/aluBar.png</file>
|
||||
<file>images/aluBarDark.png</file>
|
||||
<file>images/aluLight.jpg</file>
|
||||
<file>images/carbon.jpg</file>
|
||||
<file>images/dark.jpg</file>
|
||||
<file>images/twitter.png</file>
|
||||
<file>images/cyclist.png</file>
|
||||
<file>images/imetrics.png</file>
|
||||
|
||||
BIN
src/images/aluBar.png
Normal file
BIN
src/images/aluBar.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.8 KiB |
BIN
src/images/aluBarDark.png
Normal file
BIN
src/images/aluBarDark.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.8 KiB |
BIN
src/images/aluLight.jpg
Normal file
BIN
src/images/aluLight.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.4 KiB |
BIN
src/images/carbon.jpg
Normal file
BIN
src/images/carbon.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.0 KiB |
BIN
src/images/dark.jpg
Normal file
BIN
src/images/dark.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 429 B |
Reference in New Issue
Block a user