]> git.sur5r.net Git - minitube/commitdiff
Fix unreadable small fonts (especially on Windows)
authorFlavio Tordini <flavio.tordini@gmail.com>
Mon, 19 Oct 2009 20:09:01 +0000 (22:09 +0200)
committerFlavio Tordini <flavio.tordini@gmail.com>
Mon, 19 Oct 2009 20:09:01 +0000 (22:09 +0200)
src/MainWindow.cpp
src/playlist/PrettyItemDelegate.cpp

index dea39a32f7178212aad175f25c0cd338cf9d5efa..e0079764a6c274ee15340445ad34907cd814a379 100755 (executable)
@@ -278,6 +278,10 @@ void MainWindow::createToolBars() {
     QFont smallerFont;
     smallerFont.setPointSize(smallerFont.pointSize()*.85);
     mainToolBar->setFont(smallerFont);
+    QFontInfo fontInfo(smallerFont);
+    if (fontInfo.pixelSize() < 10) {
+        smallerFont.setPixelSize(10);
+    }
 
     mainToolBar->setIconSize(QSize(32,32));
     // mainToolBar->addAction(backAct);
index 1239b51ce45a3546eb02bbddf3e58ddf6f403100..4640417cf5c09f0b5fbe3bcf00ad96000898b94e 100644 (file)
@@ -14,7 +14,11 @@ PrettyItemDelegate::PrettyItemDelegate( QObject* parent ) : QStyledItemDelegate(
     smallerFont.setPointSize(smallerFont.pointSize()*.85);
     smallerBoldFont.setBold(true);
     smallerBoldFont.setPointSize(smallerBoldFont.pointSize()*.85);
-
+    QFontInfo fontInfo(smallerFont);
+    if (fontInfo.pixelSize() < 10) {
+        smallerFont.setPixelSize(10);
+        smallerBoldFont.setPixelSize(10);
+    }
     createPlayIcon();
 }