Skip to content

Commit

Permalink
Tool dialog: use two columns for input device selection
Browse files Browse the repository at this point in the history
  • Loading branch information
stiglers-eponym committed Aug 23, 2023
1 parent a429937 commit 44db8f1
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/gui/tooldialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include <QGroupBox>
#include <QDoubleSpinBox>
#include <QFormLayout>
#include <QVBoxLayout>
#include <QGridLayout>
#include "src/gui/tooldialog.h"
#include "src/log.h"
#include "src/enumerates.h"
Expand Down Expand Up @@ -261,12 +261,15 @@ ToolDialog::ToolDialog(QWidget *parent) :
// Input devices
{
QGroupBox *device_group = new QGroupBox(tr("Input devices"), this);
QVBoxLayout *device_layout = new QVBoxLayout();
QGridLayout *device_layout = new QGridLayout();
device_layout->setSpacing(0);
int i = 0;
for (auto it = string_to_input_device.cbegin(); it != string_to_input_device.cend(); ++it)
{
QCheckBox *button = new QCheckBox(Tool::tr(it.key().c_str()), device_group);
device_layout->addWidget(button);
device_layout->addWidget(button, i/2, i%2);
device_buttons.insert(*it, button);
++i;
}
device_group->setLayout(device_layout);
layout->addWidget(device_group);
Expand Down
4 changes: 4 additions & 0 deletions translations/de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,10 @@
<source>Should apply micro step, but history is empty.</source>
<translation>Sollte Mikroschritt anwenden, doch Verlauf ist leer.</translation>
</message>
<message>
<source>Error in drawing history: inHistory &gt; history.size()</source>
<translation>Fehler im Verlauf der Anmerkungen: inHistory &gt; history.size()</translation>
</message>
</context>
<context>
<name>PdfMaster</name>
Expand Down
4 changes: 4 additions & 0 deletions translations/en_GB.ts
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,10 @@
<source>New item existed before, but could not find it in _z_order! Searching full array.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Error in drawing history: inHistory &gt; history.size()</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>PdfMaster</name>
Expand Down

0 comments on commit 44db8f1

Please sign in to comment.