Commit c59041f KhalilSelyan
committed
1 parent 5bc6eed commit c59041f Copy full SHA for c59041f
File tree 1 file changed +10
-9
lines changed
common/tier4_state_rviz_plugin/src
1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -96,21 +96,22 @@ void CustomElevatedButton::paintEvent(QPaintEvent *)
96
96
// Draw button background
97
97
QPainterPath backgroundPath;
98
98
backgroundPath.addRoundedRect (r, cornerRadius, cornerRadius);
99
- painter.setBrush (buttonColor);
99
+ if (!isEnabled ()) {
100
+ painter.setBrush (
101
+ QColor (autoware::state_rviz_plugin::colors::default_colors.on_surface .c_str ()));
102
+ painter.setOpacity (0.12 );
103
+ } else {
104
+ painter.setBrush (buttonColor);
105
+ }
100
106
painter.setPen (Qt::NoPen);
101
107
painter.drawPath (backgroundPath);
102
108
103
109
// Draw button text
104
- painter.setPen (currentTextColor);
105
- painter.drawText (r, Qt::AlignCenter, text ());
106
-
107
110
if (!isEnabled ()) {
108
- painter.setBrush (
109
- QColor (autoware::state_rviz_plugin::colors::default_colors.on_surface .c_str ()));
110
- painter.setPen (Qt::NoPen);
111
- painter.setOpacity (0.12 );
112
- painter.drawPath (backgroundPath);
111
+ painter.setOpacity (0.38 );
113
112
}
113
+ painter.setPen (currentTextColor);
114
+ painter.drawText (r, Qt::AlignCenter, text ());
114
115
}
115
116
116
117
void CustomElevatedButton::enterEvent (QEvent * event)
You can’t perform that action at this time.
0 commit comments