This commit is contained in:
Your Name
2024-02-14 06:15:47 -06:00
parent 19bdca892a
commit d561d2a1cd
2 changed files with 12 additions and 11 deletions

View File

@@ -38,11 +38,11 @@ MainWindow::MainWindow(QWidget *parent) : QWidget(parent) {
closeSettings();
}
});
QObject::connect(device(), &Device::interactiveTimeout, [=]() {
if (main_layout->currentWidget() == settingsWindow) {
closeSettings();
}
});
// QObject::connect(device(), &Device::interactiveTimeout, [=]() {
// if (main_layout->currentWidget() == settingsWindow) {
// closeSettings();
// }
// });
// load fonts
QFontDatabase::addApplicationFont("../assets/fonts/Inter-Black.ttf");
@@ -93,11 +93,12 @@ bool MainWindow::eventFilter(QObject *obj, QEvent *event) {
case QEvent::MouseMove: {
// ignore events when device is awakened by resetInteractiveTimeout
ignore = !device()->isAwake();
if (main_layout->currentWidget() == settingsWindow) {
device()->resetInteractiveTimeout(60 * 5); // 5 minute timeout if looking at settings window
} else {
// if (main_layout->currentWidget() == settingsWindow) {
// Not working...
// device()->resetInteractiveTimeout(60 * 5); // 5 minute timeout if looking at settings window
// } else {
device()->resetInteractiveTimeout(); // Default 30 seconds otherwise
}
// }
break;
}
default: