Skip to content

Commit

Permalink
refactor(custom_button): improve drop shadow effect (#8781)
Browse files Browse the repository at this point in the history
Signed-off-by: KhalilSelyan <[email protected]>
  • Loading branch information
KhalilSelyan authored Sep 6, 2024
1 parent ed3b321 commit eda5011
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 eda5011

Please sign in to comment.