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

Change button colors on arm and disarm #99

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ShannonGriswold
Copy link
Contributor

Pull Request

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update

Description

Change the colors of the arm and disarm buttons depending on whether the robot is armed or disarmed

Related Tickets & Documents

Copy link
Contributor

@benjaminwp18 benjaminwp18 left a comment

Choose a reason for hiding this comment

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

This works great in simulation 🎉

But... I don't like how it only applies to the Arm widget. The Arm widget uses two ButtonIndicators for its buttons, which inherit from our custom IndicatorMixin widget class. IndicatorMixin is also inherited by CircleIndicator, which made pretty green/red circles for statuses like flooding & Pi connection.

CircleIndicator used broken code that switched between stylesheets that are defined in surface/gui/gui/styles (the .qss files). I kinda like your solution (defining the stylesheets in code and switching between them just by setting the stylesheet) better, but I want your solution to work for everything that inherits from IndicatorMixin. Can you update this to work from IndicatorMixin?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Arm/Disarm buttons don't give feedback
2 participants