Changeset 7cd6da5021 in tspsg for src
- Timestamp:
- Sep 3, 2010, 5:06:43 PM (14 years ago)
- Branches:
- 0.1.3.145-beta1-symbian, 0.1.4.170-beta2-bb10, appveyor, imgbot, master, readme
- Children:
- cb1608daaf
- Parents:
- ac76a6a753
- git-author:
- Oleksii Serdiuk <contacts@…> (09/03/10 17:06:43)
- git-committer:
- Oleksii Serdiuk <contacts@…> (06/29/12 19:45:57)
- Location:
- src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
src/defaults.h
rac76a6a753 r7cd6da5021 81 81 //! Default for "Scroll to the end of output after solving" 82 82 #define DEF_SCROLL_TO_END false 83 //! Default font face 84 #define DEF_FONT_FACE "DejaVu LGC Sans Mono" 83 85 /*! 84 86 * \def DEF_FONT_SIZE -
src/globals.h
rac76a6a753 r7cd6da5021 108 108 } 109 109 110 /*!111 * \brief Returns the default font for solution output.112 * \return The family name of the default font.113 */114 inline QString getDefaultFont()115 {116 QFont f;117 #ifdef HANDHELD118 f.setStyleHint(QFont::SansSerif);119 #else // HANDHELD120 f.setStyleHint(QFont::TypeWriter);121 #endif // HANDHELD122 return f.defaultFamily();123 }124 125 110 #ifdef Q_OS_WIN32 126 111 /*! -
src/main.cpp
rac76a6a753 r7cd6da5021 53 53 qsrand(QDateTime::currentDateTime().toTime_t() ^ QCursor::pos().x() ^ QCursor::pos().y()); 54 54 55 QFontDatabase::addApplicationFont(":/files/DejaVuLGCSansMono.ttf"); 56 55 57 QTranslator en; 56 58 if (en.load("tspsg_en", PATH_L10N)) -
src/mainwindow.cpp
rac76a6a753 r7cd6da5021 748 748 pic.begin(&graph); 749 749 pic.setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); 750 QFont font = settings->value("Output/Font", QFont( getDefaultFont(), 9)).value<QFont>();750 QFont font = settings->value("Output/Font", QFont(DEF_FONT_FACE, 9)).value<QFont>(); 751 751 if (settings->value("Output/HQGraph", DEF_HQ_GRAPH).toBool()) { 752 752 font.setWeight(QFont::DemiBold); … … 1145 1145 void MainWindow::initDocStyleSheet() 1146 1146 { 1147 solutionText->document()->setDefaultFont(settings->value("Output/Font", QFont( getDefaultFont(), DEF_FONT_SIZE)).value<QFont>());1147 solutionText->document()->setDefaultFont(settings->value("Output/Font", QFont(DEF_FONT_FACE, DEF_FONT_SIZE)).value<QFont>()); 1148 1148 1149 1149 fmt_paragraph.setTopMargin(0); -
src/settingsdialog.cpp
rac76a6a753 r7cd6da5021 255 255 cbScrollToEnd->setChecked(settings->value("ScrollToEnd", DEF_SCROLL_TO_END).toBool()); 256 256 257 font = settings->value("Font", QFont( getDefaultFont(), DEF_FONT_SIZE)).value<QFont>();257 font = settings->value("Font", QFont(DEF_FONT_FACE, DEF_FONT_SIZE)).value<QFont>(); 258 258 color = settings->value("Colors/Text", DEF_TEXT_COLOR).value<QColor>(); 259 259 settings->endGroup(); … … 301 301 if (QApplication::keyboardModifiers() & Qt::ShiftModifier) { 302 302 if (QMessageBox::question(this, tr("Settings Reset"), tr("Do you really want to <b>reset all application settings to their defaults</b>?"), QMessageBox::RestoreDefaults | QMessageBox::Cancel) == QMessageBox::RestoreDefaults) { 303 _newFont = (font != QFont( getDefaultFont(), DEF_FONT_SIZE));303 _newFont = (font != QFont(DEF_FONT_FACE, DEF_FONT_SIZE)); 304 304 _newColor = (color != DEF_TEXT_COLOR); 305 305 settings->remove("");
Note: See TracChangeset
for help on using the changeset viewer.