Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sidebar: add button pressed states #25848

Merged
merged 8 commits into from Sep 20, 2022
Merged

sidebar: add button pressed states #25848

merged 8 commits into from Sep 20, 2022

Conversation

incognitojam
Copy link
Contributor

@incognitojam incognitojam commented Sep 20, 2022

resolves #25845

onroad:
Screenshot from 2022-09-20 10-39-21

bookmark pressed:
Screenshot from 2022-09-20 10-39-25

offroad:
Screenshot from 2022-09-19 20-24-21

settings pressed:
Screenshot from 2022-09-19 20-24-25

@incognitojam incognitojam marked this pull request as ready for review September 20, 2022 00:06
@incognitojam incognitojam marked this pull request as draft September 20, 2022 00:11
@incognitojam incognitojam marked this pull request as ready for review September 20, 2022 01:57
@incognitojam incognitojam changed the title add flag button to sidebar sidebar: add button pressed states Sep 20, 2022
@@ -47,17 +48,34 @@ Sidebar::Sidebar(QWidget *parent) : QFrame(parent) {
pm = std::make_unique<PubMaster, const std::initializer_list<const char *>>({"userFlag"});
}

void Sidebar::mousePressEvent(QMouseEvent *event) {
if (onroad && home_btn.contains(event->pos())) {
flag_pressed = true;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
flag_pressed = true;
bookmark_pressed = true;

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we'll keep it as flag in all of the code for now

@incognitojam incognitojam merged commit 1379989 into master Sep 20, 2022
@incognitojam incognitojam deleted the flag-btn branch September 20, 2022 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Show flag button while onroad
2 participants