aboutsummaryrefslogtreecommitdiff
path: root/src/settings_pane.cc
diff options
context:
space:
mode:
authorccolin2021-01-02 02:18:47 +0100
committerccolin2021-01-02 02:18:47 +0100
commit29a745a6ec9c3b8f6104c20d7dabdce604852352 (patch)
tree9046a5259f633737398d28878882504531b938ab /src/settings_pane.cc
parent241f7ff0755933f47b1f97239ea3f0b48e8352e3 (diff)
improve the ui for the collision list a tad
Diffstat (limited to 'src/settings_pane.cc')
-rw-r--r--src/settings_pane.cc15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/settings_pane.cc b/src/settings_pane.cc
index 4e52d55..fe2abd3 100644
--- a/src/settings_pane.cc
+++ b/src/settings_pane.cc
@@ -3,6 +3,8 @@
#include <QCheckBox>
#include <QDoubleSpinBox>
#include <QFormLayout>
+#include <QGroupBox>
+#include <QVBoxLayout>
SettingsPane::SettingsPane(QWidget *parent)
@@ -25,14 +27,21 @@ SettingsPane::SettingsPane(QWidget *parent)
layout->addRow("Taille de la sphère de collision", sphere_radius);
layout->addRow("Afficher les trajectoires", show_trajectories);
layout->addRow("Afficher les lignes de support", show_support_lines);
- layout->addRow(collisions);
+ QGroupBox *box = new QGroupBox();
+ box->setTitle("Collisions");
+ box->setFlat(true);
+ box->setAlignment(Qt::AlignHCenter);
+ QVBoxLayout *box_layout = new QVBoxLayout();
+ box_layout->addWidget(collisions);
+ box->setLayout(box_layout);
+ layout->addRow(box);
setLayout(layout);
}
void SettingsPane::addCollision(int idA, int idB, int frame) {
- CollisionItem *item = new CollisionItem(QString::number(frame) + ": "
- + QString::number(idA) + " / " + QString::number(idB),
+ CollisionItem *item = new CollisionItem("Frame " + QString::number(frame) + ": #"
+ + QString::number(idA) + " et #" + QString::number(idB),
frame);
item->setFlags(Qt::ItemIsEnabled | Qt::ItemNeverHasChildren);
collisions->addItem(item);