Skip to content

Commit

Permalink
add earlier not committed changes
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexP11223 committed Sep 10, 2020
1 parent d9ca550 commit b496f8c
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions src/config/visualseditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include <QHBoxLayout>
#include <QLabel>
#include <QVBoxLayout>
#include <QSpinBox>

VisualsEditor::VisualsEditor(QWidget* parent)
: QWidget(parent)
Expand Down Expand Up @@ -70,6 +71,28 @@ VisualsEditor::initOpacitySlider()
m_opacitySlider->setMapedValue(0, opacity, 255);
}

void
VisualsEditor::initPinBorderEditor()
{
QLabel *label = new QLabel(tr("Pin border width:"));
label->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);

m_pinBorderWidthSpinBox = new QSpinBox();
m_pinBorderWidthSpinBox->setRange(0, 20);
m_pinBorderWidthSpinBox->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
m_pinBorderWidthSpinBox->setValue(ConfigHandler().pinBorderWidthValue());
connect(m_pinBorderWidthSpinBox,
QOverload<int>::of(&QSpinBox::valueChanged),
this,
[](int val) { ConfigHandler().setPinBorderWidth(val); });

QHBoxLayout *localLayout = new QHBoxLayout();
localLayout->addWidget(label);
localLayout->addWidget(m_pinBorderWidthSpinBox);
localLayout->addItem(new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum));
m_layout->addLayout(localLayout);
}

void
VisualsEditor::saveOpacity()
{
Expand All @@ -85,6 +108,8 @@ VisualsEditor::initWidgets()

initOpacitySlider();

initPinBorderEditor();

auto boxButtons = new QGroupBox();
boxButtons->setTitle(tr("Button Selection"));
auto listLayout = new QVBoxLayout(boxButtons);
Expand Down

0 comments on commit b496f8c

Please sign in to comment.