Allows color form elements to wrap, sets minimum width to thickness s… (#2068)
* Allows color form elements to wrap, sets minimum width to thickness slider. * Uses named constant variable for slider width
This commit is contained in:
@@ -31,9 +31,11 @@ SidePanelWidget::SidePanelWidget(QPixmap* p, QWidget* parent)
|
||||
}
|
||||
|
||||
QFormLayout* colorForm = new QFormLayout();
|
||||
colorForm->setRowWrapPolicy(QFormLayout::WrapLongRows);
|
||||
m_toolSizeSlider = new QSlider(Qt::Horizontal);
|
||||
m_toolSizeSlider->setRange(1, maxToolSize);
|
||||
m_toolSizeSlider->setValue(m_toolSize);
|
||||
m_toolSizeSlider->setMinimumWidth(minSliderWidth);
|
||||
m_colorLabel = new QLabel();
|
||||
m_colorLabel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
|
||||
colorForm->addRow(tr("Active tool size:"), m_toolSizeSlider);
|
||||
|
||||
@@ -15,6 +15,7 @@ class QColorPickingEventFilter;
|
||||
class QSlider;
|
||||
|
||||
constexpr int maxToolSize = 50;
|
||||
constexpr int minSliderWidth = 100;
|
||||
|
||||
class SidePanelWidget : public QWidget
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user