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 a4d0414
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions src/config/visualseditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include "src/utils/confighandler.h"
#include <QHBoxLayout>
#include <QLabel>
#include <QSpinBox>
#include <QVBoxLayout>

VisualsEditor::VisualsEditor(QWidget* parent)
Expand Down Expand Up @@ -70,6 +71,30 @@ 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 +110,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 a4d0414

Please sign in to comment.