From 3bcc3f69896539d6e5d82c4c199c7bf470e00ff4 Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Wed, 9 Feb 2022 15:58:59 +0600 Subject: [PATCH] qt: Status bar fixes * Fix inverted logic for network icon * Scale the status bar pixmaps only on Windows --- src/qt/qt_machinestatus.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/qt/qt_machinestatus.cpp b/src/qt/qt_machinestatus.cpp index be8870989..cd9938cce 100644 --- a/src/qt/qt_machinestatus.cpp +++ b/src/qt/qt_machinestatus.cpp @@ -172,7 +172,9 @@ struct MachineStatus::States { Pixmaps pixmaps; States(QObject* parent) { +#ifdef _WIN32 pixmap_size = QSize(16, 16) * qobject_cast(parent->parent())->screen()->devicePixelRatio(); +#endif pixmaps.cartridge.load("/cartridge%1.ico"); pixmaps.cassette.load("/cassette%1.ico"); pixmaps.floppy_disabled.normal = ProgSettings::loadIcon(QStringLiteral("/floppy_disabled.ico")).pixmap(pixmap_size); @@ -332,7 +334,7 @@ void MachineStatus::refresh(QStatusBar* sbar) { int c_xta = hdd_count(HDD_BUS_XTA); int c_ide = hdd_count(HDD_BUS_IDE); int c_scsi = hdd_count(HDD_BUS_SCSI); - int do_net = (network_type == NET_TYPE_NONE) || (network_card == 0); + int do_net = network_available(); sbar->removeWidget(d->cassette.label.get()); for (int i = 0; i < 2; ++i) {