diff --git a/visualization/tier4_state_rviz_plugin/src/custom_container.cpp b/visualization/tier4_state_rviz_plugin/src/custom_container.cpp index 681cebbefd492..5f0895ddae9e7 100644 --- a/visualization/tier4_state_rviz_plugin/src/custom_container.cpp +++ b/visualization/tier4_state_rviz_plugin/src/custom_container.cpp @@ -51,7 +51,7 @@ void CustomContainer::paintEvent(QPaintEvent *) // Draw background QPainterPath path; - path.addRoundedRect(rect(), height() / 2, height() / 2); // Use height for rounded corners + path.addRoundedRect(rect(), height() / 2.0, height() / 2.0); // Use height for rounded corners painter.setPen(Qt::NoPen); painter.setBrush(QColor( autoware::state_rviz_plugin::colors::default_colors.surface.c_str())); // Background color diff --git a/visualization/tier4_state_rviz_plugin/src/custom_icon_label.cpp b/visualization/tier4_state_rviz_plugin/src/custom_icon_label.cpp index 6e4d32d40f7fb..e01d2904ffbd2 100644 --- a/visualization/tier4_state_rviz_plugin/src/custom_icon_label.cpp +++ b/visualization/tier4_state_rviz_plugin/src/custom_icon_label.cpp @@ -65,7 +65,7 @@ void CustomIconLabel::paintEvent(QPaintEvent *) // Draw background circle QPainterPath path; - path.addEllipse(width() / 2 - radius, height() / 2 - radius, diameter, diameter); + path.addEllipse(width() / 2.0 - radius, height() / 2.0 - radius, diameter, diameter); painter.setPen(Qt::NoPen); painter.setBrush(backgroundColor); painter.drawPath(path); diff --git a/visualization/tier4_state_rviz_plugin/src/custom_segmented_button.cpp b/visualization/tier4_state_rviz_plugin/src/custom_segmented_button.cpp index 8063bdc0fbc28..87b4f7dba4653 100644 --- a/visualization/tier4_state_rviz_plugin/src/custom_segmented_button.cpp +++ b/visualization/tier4_state_rviz_plugin/src/custom_segmented_button.cpp @@ -66,7 +66,7 @@ void CustomSegmentedButton::paintEvent(QPaintEvent *) // Draw background QPainterPath path; - path.addRoundedRect(rect(), height() / 2, height() / 2); + path.addRoundedRect(rect(), height() / 2.0, height() / 2.0); painter.setPen(Qt::NoPen); painter.setBrush( diff --git a/visualization/tier4_state_rviz_plugin/src/custom_segmented_button_item.cpp b/visualization/tier4_state_rviz_plugin/src/custom_segmented_button_item.cpp index cdd3aa0d25263..192b1cbfa86f5 100644 --- a/visualization/tier4_state_rviz_plugin/src/custom_segmented_button_item.cpp +++ b/visualization/tier4_state_rviz_plugin/src/custom_segmented_button_item.cpp @@ -125,7 +125,7 @@ void CustomSegmentedButtonItem::paintEvent(QPaintEvent *) } QPainterPath path; - double radius = (height() - 2) / 2; + double radius = (height() - 2.0) / 2.0; path.setFillRule(Qt::WindingFill); if (isFirstButton) {