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

refactor(custom_button): improve drop shadow effect #8781

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions common/tier4_state_rviz_plugin/src/custom_button.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,13 @@
font.setFamily("Roboto");
setFont(font);

QColor shadowColor = QColor(autoware::state_rviz_plugin::colors::default_colors.shadow.c_str());
shadowColor.setAlpha(255 * 0.6);

Check warning on line 38 in common/tier4_state_rviz_plugin/src/custom_button.cpp

View check run for this annotation

Codecov / codecov/patch

common/tier4_state_rviz_plugin/src/custom_button.cpp#L37-L38

Added lines #L37 - L38 were not covered by tests
// Set up drop shadow effect
QGraphicsDropShadowEffect * shadowEffect = new QGraphicsDropShadowEffect(this);
shadowEffect->setBlurRadius(15);
shadowEffect->setOffset(3, 3);
shadowEffect->setColor(
QColor(autoware::state_rviz_plugin::colors::default_colors.shadow.c_str()));
shadowEffect->setBlurRadius(5);

Check warning on line 41 in common/tier4_state_rviz_plugin/src/custom_button.cpp

View check run for this annotation

Codecov / codecov/patch

common/tier4_state_rviz_plugin/src/custom_button.cpp#L41

Added line #L41 was not covered by tests
shadowEffect->setOffset(0, 1);
shadowEffect->setColor(shadowColor);

Check warning on line 43 in common/tier4_state_rviz_plugin/src/custom_button.cpp

View check run for this annotation

Codecov / codecov/patch

common/tier4_state_rviz_plugin/src/custom_button.cpp#L43

Added line #L43 was not covered by tests
setGraphicsEffect(shadowEffect);
}

Expand Down
Loading