Temporary fix for dark style. Fixes #326

* Ignore Wifis with missing network name on macOS. Fixes #429
This commit is contained in:
Manu 2020-05-22 16:02:37 +08:00 committed by GitHub
parent e82e35363f
commit 08598cb45e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 1 deletions

View File

@ -141,7 +141,11 @@ def get_sorted_wifis(profile):
if wifis is not None:
for wifi in wifis.values():
timestamp = wifi.get('LastConnected', None)
ssid = wifi['SSIDString']
ssid = wifi.get('SSIDString', None)
if ssid is None:
continue
db_wifi, created = WifiSettingModel.get_or_create(
ssid=ssid,
profile=profile.id,

View File

@ -31,6 +31,21 @@ class MainWindow(MainWindowBase, MainWindowUI):
self.current_profile = BackupProfileModel.select().order_by('id').first()
self.setWindowFlags(QtCore.Qt.WindowCloseButtonHint | QtCore.Qt.WindowMinimizeButtonHint)
# Temporary fix for QT Darkstyle dropdown issue.
# See https://github.com/ColinDuquesnoy/QDarkStyleSheet/issues/200
self.setStyleSheet(
"""
QComboBox::item:checked {
height: 12px;
border: 1px solid #32414B;
margin-top: 0px;
margin-bottom: 0px;
padding: 4px;
padding-left: 0px;
}
"""
)
# Load tab models
self.repoTab = RepoTab(self.repoTabSlot)
self.sourceTab = SourceTab(self.sourceTabSlot)