File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change 28
28
#include < QMessageBox>
29
29
#include < QCloseEvent>
30
30
#include < QStyleFactory>
31
+ #include < QKeyEvent>
31
32
#include " OpenRGBFont.h"
32
33
33
34
#ifdef __APPLE__
@@ -665,6 +666,26 @@ void OpenRGBDialog2::closeEvent(QCloseEvent *event)
665
666
}
666
667
}
667
668
669
+ void OpenRGBDialog2::keyPressEvent (QKeyEvent *event)
670
+ {
671
+ if (event->key () == Qt::Key_F11)
672
+ {
673
+ if (isFullScreen ())
674
+ {
675
+ showNormal ();
676
+ }
677
+ else
678
+ {
679
+ showFullScreen ();
680
+ }
681
+ event->accept ();
682
+ }
683
+ else
684
+ {
685
+ QMainWindow::keyPressEvent (event);
686
+ }
687
+ }
688
+
668
689
bool OpenRGBDialog2::SelectConfigProfile (const std::string name)
669
690
{
670
691
/* -----------------------------------------------------*\
Original file line number Diff line number Diff line change @@ -84,6 +84,9 @@ public slots:
84
84
void SetTrayIcon (bool tray_icon);
85
85
void handleAboutToQuit ();
86
86
87
+ protected:
88
+ void keyPressEvent (QKeyEvent *event) override ;
89
+
87
90
private:
88
91
const char * context = " Ui::OpenRGBDialog2" ;
89
92
You can’t perform that action at this time.
0 commit comments