Option to hide mouse on inactivity (#5094)

* Add and implement option to hide mouse on iniactivity
+ clang format

* Set mouse hide timeout as a constant

* Address review comments, decrease mouse inactivity timeout to 2500ms

* Hide mouse: fix menubar bugs

squashable

* Hide mouse: ensure status bar has the default pointer
This commit is contained in:
Vitor K 2020-04-07 11:58:51 -03:00 committed by GitHub
parent d37b0476ad
commit 23921e3203
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 77 additions and 0 deletions

View file

@ -220,6 +220,8 @@ private:
void UpdateWindowTitle();
void RetranslateStatusBar();
void InstallCIA(QStringList filepaths);
void HideMouseCursor();
void ShowMouseCursor();
Ui::MainWindow ui;
@ -248,6 +250,7 @@ private:
QString game_path;
bool auto_paused = false;
QTimer mouse_hide_timer;
// Movie
bool movie_record_on_start = false;
@ -291,6 +294,8 @@ protected:
void dropEvent(QDropEvent* event) override;
void dragEnterEvent(QDragEnterEvent* event) override;
void dragMoveEvent(QDragMoveEvent* event) override;
void mouseMoveEvent(QMouseEvent* event) override;
void mousePressEvent(QMouseEvent* event) override;
};
Q_DECLARE_METATYPE(std::size_t);