Skip to content

Commit

Permalink
refactor(custom_button): improve drop shadow effect (autowarefoundati…
Browse files Browse the repository at this point in the history
…on#8781)

Signed-off-by: KhalilSelyan <[email protected]>
Signed-off-by: emuemuJP <[email protected]>
  • Loading branch information
KhalilSelyan authored and emuemuJP committed Sep 10, 2024
1 parent b6225b4 commit 7b55af2
Showing 1 changed file with 5 additions and 4 deletions.
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 @@ CustomElevatedButton::CustomElevatedButton(
font.setFamily("Roboto");
setFont(font);

QColor shadowColor = QColor(autoware::state_rviz_plugin::colors::default_colors.shadow.c_str());
shadowColor.setAlpha(255 * 0.6);
// 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);
shadowEffect->setOffset(0, 1);
shadowEffect->setColor(shadowColor);
setGraphicsEffect(shadowEffect);
}

Expand Down

0 comments on commit 7b55af2

Please sign in to comment.