From: Sakari Poussa Date: Thu, 27 May 2010 16:42:57 +0000 (+0300) Subject: All fonts are now bigger (20pt) X-Git-Url: https://vcs.maemo.org/git/?p=scorecard;a=commitdiff_plain;h=d4c3c8552aae0328f8169f668b4ff0eb25ea41b1 All fonts are now bigger (20pt) --- diff --git a/src/course-dialog.cpp b/src/course-dialog.cpp index 9010ef1..d8192ea 100644 --- a/src/course-dialog.cpp +++ b/src/course-dialog.cpp @@ -38,7 +38,7 @@ CourseWindow::CourseWindow(QWidget *parent) : QMainWindow(parent) QTableView * table = new QTableView; table->showGrid(); table->setSelectionMode(QAbstractItemView::NoSelection); - table->setStyleSheet(ScoreStyle::style()); + table->setStyleSheet(defaultStyleSheet); table->horizontalHeader()->setResizeMode(QHeaderView::Stretch); table->verticalHeader()->setResizeMode(QHeaderView::Stretch); table->horizontalHeader()->hide(); @@ -192,7 +192,7 @@ void CourseDialog::createTable(QWidget *parent) table->horizontalHeader()->hide(); table->horizontalHeader()->setResizeMode(QHeaderView::Stretch); table->verticalHeader()->setResizeMode(QHeaderView::Stretch); - table->setStyleSheet(ScoreStyle::style()); + table->setStyleSheet(defaultStyleSheet); } void CourseDialog::init(Course *course) diff --git a/src/main-window.cpp b/src/main-window.cpp index f028e39..12f774a 100644 --- a/src/main-window.cpp +++ b/src/main-window.cpp @@ -258,7 +258,7 @@ void MainWindow::createListView(QList &scoreList, scoreListModel = new ScoreListModel(scoreList, clubList); courseListModel = new CourseListModel(clubList); - list->setStyleSheet(ScoreStyle::style()); + list->setStyleSheet(defaultStyleSheet); list->setSelectionMode(QAbstractItemView::SingleSelection); list->setProperty("FingerScrolling", true); @@ -627,7 +627,7 @@ void MainWindow::viewStatistics() QTableView *table = new QTableView; table->showGrid(); table->setSelectionMode(QAbstractItemView::NoSelection); - table->setStyleSheet(ScoreStyle::style()); + table->setStyleSheet(statStyleSheet); table->horizontalHeader()->setResizeMode(QHeaderView::Stretch); table->verticalHeader()->setResizeMode(QHeaderView::Stretch); table->verticalHeader()->setAutoFillBackground(true); diff --git a/src/score-common.h b/src/score-common.h index 149308d..dca5d09 100644 --- a/src/score-common.h +++ b/src/score-common.h @@ -8,26 +8,6 @@ #ifndef SCORE_COMMON_H #define SCORE_COMMON_H -#if 0 -#define SC_BLUE_THEME - -QColor colorHoleBg(64, 64, 64); -QColor colorHoleFg(Qt::yellow); -QColor colorBirdie(00, 0x99, 00); -QColor colorPar(Qt::black); -#ifdef SC_ORANGE_THEME -QColor colorBogey(0xfc, 0xaf, 0x3e); -QColor colorDoubleBogey(0xf5, 0x79, 0x00); -QColor colorBad(0xce, 0x5c, 0x00); -#endif -#ifdef SC_BLUE_THEME -QColor colorBogey(0x20, 0x4a, 0x87); -QColor colorDoubleBogey(0x34, 0x65, 0xa4); -QColor colorBad(0x72, 0x9f, 0xcf); -#endif -QColor colorSubTotal(Qt::black); -QColor colorTotal(Qt::black); -#endif #include #ifndef WANT_DEBUG @@ -37,6 +17,7 @@ QColor colorTotal(Qt::black); #define TRACE qDebug()<showGrid(); table->setSelectionMode(QAbstractItemView::NoSelection); - table->setStyleSheet(ScoreStyle::style()); + table->setStyleSheet(defaultStyleSheet); table->horizontalHeader()->setResizeMode(QHeaderView::Stretch); table->verticalHeader()->setResizeMode(QHeaderView::Stretch); table->horizontalHeader()->hide(); @@ -196,6 +196,9 @@ ScoreDialog::ScoreDialog(QWidget *parent) : QDialog(parent) { TRACE; resize(800, 400); + QFont font; + font.setPointSize(fontSize); + setFont(font); QWidget *centralWidget = new QWidget(this); @@ -253,7 +256,7 @@ void ScoreDialog::createTable(QWidget *parent) table->verticalHeader()->setResizeMode(QHeaderView::Stretch); table->horizontalHeader()->hide(); - table->setStyleSheet(ScoreStyle::style()); + table->setStyleSheet(defaultStyleSheet); QStringList headers; headers << "" << "Par" << "HCP" << "Score" << "" << "Par" << "HCP" << "Score"; diff --git a/src/stat-model.cpp b/src/stat-model.cpp index 605fc8d..9ce9526 100644 --- a/src/stat-model.cpp +++ b/src/stat-model.cpp @@ -7,7 +7,9 @@ */ #include +#include +#include "score-common.h" #include "stat-model.h" StatModel::StatModel(QList &cList, QList &sList) : clubList(cList), scoreList(sList) @@ -46,6 +48,14 @@ QVariant StatModel::data(const QModelIndex & index, int role) const } // + // FONT + // + if (role == Qt::FontRole) { + QFont font; + font.setPointSize(fontSize); + return font; + } + // // NUMBERS // if (role == Qt::DisplayRole) { diff --git a/src/table-model.cpp b/src/table-model.cpp index 649949c..24578e6 100644 --- a/src/table-model.cpp +++ b/src/table-model.cpp @@ -122,8 +122,10 @@ QVariant ScoreTableModel::data(const QModelIndex &index, int role) const // if (role == Qt::FontRole) { QFont font; - font.setBold(true); - font.setPointSize(26); + font.setPointSize(fontSize); + if (row == ROW_HOLE || row == ROW_HOLE_2) { + font.setBold(true); + } return font; } @@ -199,6 +201,11 @@ QVariant ScoreTableModel::headerData(int section, Qt::Orientation orientation, i if (orientation == Qt::Horizontal) return QVariant(); + if (role == Qt::FontRole) { + QFont font; + font.setPointSize(fontSize); + return font; + } if (role == Qt::DisplayRole) { switch(section) { case ROW_HOLE: @@ -263,11 +270,12 @@ QVariant CourseTableModel::data(const QModelIndex &index, int role) const // FONT // if (role == Qt::FontRole) { + QFont font; + font.setPointSize(fontSize); if (row == ROW_HOLE || row == ROW_HOLE_2) { - QFont font; font.setBold(true); - return font; } + return font; } // // COLORS @@ -338,6 +346,11 @@ QVariant CourseTableModel::headerData(int section, Qt::Orientation orientation, if (orientation == Qt::Horizontal) return QVariant(); + if (role == Qt::FontRole) { + QFont font; + font.setPointSize(fontSize); + return font; + } if (role == Qt::DisplayRole) { switch(section) { case ROW_HOLE: