aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorCrystalwarrior <Varsash@Gmail.com>2022-07-29 18:36:58 +0300
committerGitHub <noreply@github.com>2022-07-29 18:36:58 +0300
commit3c3002122ece4909ad9ca49fbf67715379c4f5ef (patch)
tree87e042831a44ad64b6fcafe2c4d65529d58cf293 /include
parent7301e62c737f17da55be71b9e93e96ef38f7a1ba (diff)
Add settings option for Evidence double-click that can be turned off (single-click evidence view) and more (#749)
* Add 'evidence_one_click_view' courtroom_design.ini function, which allows you to treat every click as if it's a double-click (meaning every click will bring evidence overlay) Fix name not being set to read only when evidence is initialized If evidence is double-clicked and overlay is visible, trigger "on_x_clicked" behavior Make sure evidence is selected when double-click is called Stop hovering from changing name text if overlay is visible Simplify on_evidence_x_clicked "modified" check by simply checking if "ui_evidence_ok" is visible * Fix pressing "cancel" when trying to switch between evidence still acting the same as "discard" * Remove unnecessary ic message input focus setters for evidence, make only the Present button set focus on ic message input * Fix second page ignoring the evidence_one_click_view setting because of a wrong ID being used for the double-click call * Make evidence_switch() have everything required to properly switch between private/global * Make evidence cursor start at the top when looking at evidence description * Change it from theme setting to settings option * Make evidence double click default option to "true" due to it being the default for years Co-authored-by: Salanto <62221668+Salanto@users.noreply.github.com>
Diffstat (limited to 'include')
-rw-r--r--include/aoapplication.h3
-rw-r--r--include/aooptionsdialog.h2
-rw-r--r--include/courtroom.h2
3 files changed, 6 insertions, 1 deletions
diff --git a/include/aoapplication.h b/include/aoapplication.h
index d9b9e89..c69a0d3 100644
--- a/include/aoapplication.h
+++ b/include/aoapplication.h
@@ -538,6 +538,9 @@ public:
// Get whether to opt out of player count metrics sent to the master server
bool get_player_count_optout();
+ // Whether opening evidence requires a single or double click
+ bool get_evidence_double_click();
+
// Currently defined subtheme
QString subtheme;
diff --git a/include/aooptionsdialog.h b/include/aooptionsdialog.h
index cb9b71b..a5b1e4d 100644
--- a/include/aooptionsdialog.h
+++ b/include/aooptionsdialog.h
@@ -51,6 +51,8 @@ private:
QLabel *ui_subtheme_label;
QComboBox *ui_subtheme_combobox;
QPushButton *ui_theme_reload_button;
+ QLabel *ui_evidence_double_click_lbl;
+ QCheckBox *ui_evidence_double_click_cb;
QLabel *ui_animated_theme_lbl;
QCheckBox *ui_animated_theme_cb;
QFrame *ui_theme_log_divider;
diff --git a/include/courtroom.h b/include/courtroom.h
index 0c53c95..88e6037 100644
--- a/include/courtroom.h
+++ b/include/courtroom.h
@@ -974,7 +974,7 @@ private slots:
void on_evidence_button_clicked();
void on_evidence_delete_clicked();
- void on_evidence_x_clicked();
+ bool on_evidence_x_clicked();
void on_evidence_ok_clicked();
void on_evidence_switch_clicked();
void on_evidence_transfer_clicked();