Hi-DPI Support - Workout Editor

.. chart marker font still outstanding, but applies to all
   charts and will be fixed independently of this.
This commit is contained in:
Mark Liversedge
2017-03-13 16:00:11 +00:00
parent 94052523e2
commit 0a9aea9900
3 changed files with 29 additions and 27 deletions

View File

@@ -87,7 +87,7 @@ WorkoutWindow::WorkoutWindow(Context *context) :
toolbar = new QToolBar(this);
toolbar->setToolButtonStyle(Qt::ToolButtonTextUnderIcon);
toolbar->setFloatable(true);
toolbar->setIconSize(QSize(18,18));
toolbar->setIconSize(QSize(18 *dpiXFactor,18 *dpiYFactor));
QIcon newIcon(":images/toolbar/new doc.png");
newAct = new QAction(newIcon, tr("New"), this);
@@ -271,7 +271,7 @@ WorkoutWindow::configChanged(qint32)
// maximum of 20 characters per line ?
QFont f;
QFontMetrics ff(f);
code->setFixedWidth(ff.boundingRect("99x999s@999-999r999s@999-999").width()+20);
code->setFixedWidth(ff.boundingRect("99x999s@999-999r999s@999-999").width()+(20* dpiXFactor));
// text edit colors
QPalette palette;