From 7b55af2b588436fc3873a12843263a511d09a32a Mon Sep 17 00:00:00 2001 From: Khalil Selyan <36904941+KhalilSelyan@users.noreply.github.com> Date: Fri, 6 Sep 2024 03:48:47 +0300 Subject: [PATCH] refactor(custom_button): improve drop shadow effect (#8781) Signed-off-by: KhalilSelyan Signed-off-by: emuemuJP --- common/tier4_state_rviz_plugin/src/custom_button.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/common/tier4_state_rviz_plugin/src/custom_button.cpp b/common/tier4_state_rviz_plugin/src/custom_button.cpp index 26d9d699038d8..7ad43190b0f41 100644 --- a/common/tier4_state_rviz_plugin/src/custom_button.cpp +++ b/common/tier4_state_rviz_plugin/src/custom_button.cpp @@ -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); }