@@ -192,10 +192,16 @@ QVBoxLayout * AutowareStatePanel::makeOperationModeGroup()
192
192
193
193
CustomContainer * group1 = new CustomContainer (this );
194
194
195
+ auto * horizontal_layout = new QHBoxLayout;
196
+ horizontal_layout->setSpacing (10 );
197
+ horizontal_layout->setContentsMargins (0 , 0 , 0 , 0 );
198
+
199
+ horizontal_layout->addWidget (control_mode_switch_ptr_);
200
+ horizontal_layout->addWidget (control_mode_label_ptr_);
201
+
195
202
// add switch and label to the container
196
203
group1->setContentsMargins (0 , 0 , 0 , 10 );
197
- group1->getLayout ()->addWidget (control_mode_switch_ptr_, 0 , 0 , 1 , 1 , Qt::AlignLeft);
198
- group1->getLayout ()->addWidget (control_mode_label_ptr_, 0 , 1 , 1 , 4 , Qt::AlignLeft);
204
+ group1->getLayout ()->addLayout (horizontal_layout, 0 , 0 , 1 , 1 , Qt::AlignLeft);
199
205
200
206
// Create the CustomSegmentedButton
201
207
segmented_button = new CustomSegmentedButton (this );
@@ -230,8 +236,14 @@ QVBoxLayout * AutowareStatePanel::makeRoutingGroup()
230
236
QLabel * routing_label = new QLabel (" Routing" );
231
237
routing_label->setStyleSheet (" color: #d0e6f2; font-weight: bold;" );
232
238
233
- custom_container->getLayout ()->addWidget (routing_icon, 0 , 0 , 1 , 1 , Qt::AlignLeft);
234
- custom_container->getLayout ()->addWidget (routing_label, 0 , 1 , 1 , 1 , Qt::AlignLeft);
239
+ auto * horizontal_layout = new QHBoxLayout;
240
+ horizontal_layout->setSpacing (10 );
241
+ horizontal_layout->setContentsMargins (0 , 0 , 0 , 0 );
242
+
243
+ horizontal_layout->addWidget (routing_icon);
244
+ horizontal_layout->addWidget (routing_label);
245
+
246
+ custom_container->getLayout ()->addLayout (horizontal_layout, 0 , 0 , 1 , 1 , Qt::AlignLeft);
235
247
custom_container->getLayout ()->addWidget (clear_route_button_ptr_, 0 , 2 , 1 , 4 , Qt::AlignRight);
236
248
237
249
custom_container->setContentsMargins (10 , 0 , 0 , 0 );
@@ -254,8 +266,14 @@ QVBoxLayout * AutowareStatePanel::makeLocalizationGroup()
254
266
QLabel * localization_label = new QLabel (" Localization" );
255
267
localization_label->setStyleSheet (" color: #d0e6f2; font-weight: bold;" );
256
268
257
- custom_container->getLayout ()->addWidget (localization_icon, 0 , 0 , 1 , 1 , Qt::AlignLeft);
258
- custom_container->getLayout ()->addWidget (localization_label, 0 , 1 , 1 , 1 , Qt::AlignLeft);
269
+ auto * horizontal_layout = new QHBoxLayout;
270
+ horizontal_layout->setSpacing (10 );
271
+ horizontal_layout->setContentsMargins (0 , 0 , 0 , 0 );
272
+
273
+ horizontal_layout->addWidget (localization_icon);
274
+ horizontal_layout->addWidget (localization_label);
275
+
276
+ custom_container->getLayout ()->addLayout (horizontal_layout, 0 , 0 , 1 , 1 , Qt::AlignLeft);
259
277
custom_container->getLayout ()->addWidget (init_by_gnss_button_ptr_, 0 , 2 , 1 , 4 , Qt::AlignRight);
260
278
261
279
custom_container->setContentsMargins (10 , 0 , 0 , 0 );
@@ -278,8 +296,15 @@ QVBoxLayout * AutowareStatePanel::makeMotionGroup()
278
296
QLabel * motion_label = new QLabel (" Motion" );
279
297
motion_label->setStyleSheet (" color: #d0e6f2; font-weight: bold;" );
280
298
281
- custom_container->getLayout ()->addWidget (motion_icon, 0 , 0 , 1 , 1 , Qt::AlignLeft);
282
- custom_container->getLayout ()->addWidget (motion_label, 0 , 1 , 1 , 1 , Qt::AlignLeft);
299
+ auto * horizontal_layout = new QHBoxLayout;
300
+ horizontal_layout->setSpacing (10 );
301
+ horizontal_layout->setContentsMargins (0 , 0 , 0 , 0 );
302
+ horizontal_layout->setAlignment (Qt::AlignLeft);
303
+
304
+ horizontal_layout->addWidget (motion_icon);
305
+ horizontal_layout->addWidget (motion_label);
306
+
307
+ custom_container->getLayout ()->addLayout (horizontal_layout, 0 , 0 , 1 , 1 , Qt::AlignLeft);
283
308
custom_container->getLayout ()->addWidget (accept_start_button_ptr_, 0 , 2 , 1 , 4 , Qt::AlignRight);
284
309
285
310
custom_container->setContentsMargins (10 , 0 , 0 , 0 );
@@ -306,11 +331,23 @@ QVBoxLayout * AutowareStatePanel::makeFailSafeGroup()
306
331
mrm_state_label_ptr_->setStyleSheet (" color: #d0e6f2; font-weight: bold;" );
307
332
mrm_behavior_label_ptr_->setStyleSheet (" color: #d0e6f2; font-weight: bold;" );
308
333
309
- custom_container1->getLayout ()->addWidget (mrm_state_icon, 0 , 0 , 1 , 1 , Qt::AlignLeft);
310
- custom_container1->getLayout ()->addWidget (mrm_state_label_ptr_, 0 , 1 , 1 , 5 , Qt::AlignLeft);
334
+ auto * horizontal_layout = new QHBoxLayout;
335
+ horizontal_layout->setSpacing (10 );
336
+ horizontal_layout->setContentsMargins (0 , 0 , 0 , 0 );
337
+
338
+ horizontal_layout->addWidget (mrm_state_icon);
339
+ horizontal_layout->addWidget (mrm_state_label_ptr_);
340
+
341
+ custom_container1->getLayout ()->addLayout (horizontal_layout, 0 , 0 , 1 , 1 , Qt::AlignLeft);
342
+
343
+ auto * horizontal_layout2 = new QHBoxLayout;
344
+ horizontal_layout2->setSpacing (10 );
345
+ horizontal_layout2->setContentsMargins (0 , 0 , 0 , 0 );
346
+
347
+ horizontal_layout2->addWidget (mrm_behavior_icon);
348
+ horizontal_layout2->addWidget (mrm_behavior_label_ptr_);
311
349
312
- custom_container2->getLayout ()->addWidget (mrm_behavior_icon, 0 , 0 , 1 , 1 , Qt::AlignLeft);
313
- custom_container2->getLayout ()->addWidget (mrm_behavior_label_ptr_, 0 , 1 , 1 , 5 , Qt::AlignLeft);
350
+ custom_container2->getLayout ()->addLayout (horizontal_layout2, 0 , 0 , 1 , 1 , Qt::AlignLeft);
314
351
315
352
v_layout->addWidget (custom_container1);
316
353
// v_layout->addSpacing(5);
@@ -400,6 +437,7 @@ QVBoxLayout * AutowareStatePanel::makeVelocityLimitGroup()
400
437
QLabel * velocity_limit_label = new QLabel (" km/h" );
401
438
402
439
velocity_limit_layout->addWidget (pub_velocity_limit_slider_);
440
+ velocity_limit_layout->addSpacing (5 );
403
441
velocity_limit_layout->addWidget (velocity_limit_value_label_);
404
442
velocity_limit_layout->addWidget (velocity_limit_label);
405
443
0 commit comments