mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-13 04:38:28 +00:00
(1) Fix menu bar item font size on Windows, (2) fix for possible Windows EthernetTap infinite loop while enumerating registry.
This commit is contained in:
@ -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<QWidget*>();
|
||||
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);
|
||||
|
Reference in New Issue
Block a user