From 742261c7fc8181e5c1a7567d9fdf51518d90c8bf Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Thu, 6 Mar 2014 14:06:31 -0800 Subject: (1) Fix menu bar item font size on Windows, (2) fix for possible Windows EthernetTap infinite loop while enumerating registry. --- ZeroTierUI/mainwindow.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'ZeroTierUI/mainwindow.cpp') diff --git a/ZeroTierUI/mainwindow.cpp b/ZeroTierUI/mainwindow.cpp index 9ea6a8f9..3e331a43 100644 --- a/ZeroTierUI/mainwindow.cpp +++ b/ZeroTierUI/mainwindow.cpp @@ -109,9 +109,11 @@ MainWindow::MainWindow(QWidget *parent) : #endif #ifdef __WINDOWS__ + // Windows operates at a different DPI, so we have to rescale the default Qt + // font sizes so everything isn't huge. Yeah. QWidgetList widgets = this->findChildren(); foreach(QWidget *widget, widgets) { - if ((typeid(*widget) != typeid(ui->menuBar))&&(typeid(*widget) != typeid(ui->menuFile))) { + if (typeid(*widget) != typeid(*ui->menuFile)) { // menus don't need the DPI shift apparently QFont font(widget->font()); font.setPointSizeF(font.pointSizeF() * 0.75); widget->setFont(font); -- cgit v1.2.3