From: Flavio Tordini Date: Mon, 19 Oct 2009 20:09:01 +0000 (+0200) Subject: Fix unreadable small fonts (especially on Windows) X-Git-Tag: 0.8~52 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=73c95f4e143004b37a47bfed070d3608a7aa8ed2;p=minitube Fix unreadable small fonts (especially on Windows) --- diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index dea39a3..e007976 100755 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -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); diff --git a/src/playlist/PrettyItemDelegate.cpp b/src/playlist/PrettyItemDelegate.cpp index 1239b51..4640417 100644 --- a/src/playlist/PrettyItemDelegate.cpp +++ b/src/playlist/PrettyItemDelegate.cpp @@ -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(); }