(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:
parent
939cdc82a2
commit
742261c7fc
4 changed files with 182 additions and 136 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue