Commit 0bb88756 authored by Dmitry Kazakov's avatar Dmitry Kazakov

Make the onion skins dialog look smaller by default

parent 01fd7108
......@@ -49,7 +49,7 @@ KisEqualizerButton::KisEqualizerButton(QWidget *parent)
m_d(new Private(this))
{
setFocusPolicy(Qt::WheelFocus);
setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
}
KisEqualizerButton::~KisEqualizerButton()
......@@ -137,6 +137,12 @@ QSize KisEqualizerButton::sizeHint() const
return QSize(15, minHeight);
}
QSize KisEqualizerButton::minimumSizeHint() const
{
QSize sh = sizeHint();
return QSize(10, sh.height());
}
void KisEqualizerButton::enterEvent(QEvent *event)
{
Q_UNUSED(event);
......
......@@ -33,6 +33,7 @@ public:
void setRightmost(bool value);
QSize sizeHint() const;
QSize minimumSizeHint() const;
void enterEvent(QEvent *event);
void leaveEvent(QEvent *event);
......
......@@ -41,20 +41,18 @@ KisEqualizerColumn::KisEqualizerColumn(QWidget *parent, int id, const QString &t
: QWidget(parent),
m_d(new Private)
{
setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
m_d->id = id;
m_d->stateButton = new KisEqualizerButton(this);
m_d->stateButton->setText(title);
m_d->stateButton->setCheckable(true);
m_d->stateButton->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
m_d->mainSlider = new KisEqualizerSlider(this);
m_d->mainSlider->setRange(0, 100);
m_d->mainSlider->setSingleStep(5);
m_d->mainSlider->setPageStep(10);
m_d->mainSlider->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
QVBoxLayout *vbox = new QVBoxLayout(this);
......
......@@ -50,7 +50,7 @@ KisEqualizerSlider::KisEqualizerSlider(QWidget *parent)
{
setOrientation(Qt::Vertical);
setFocusPolicy(Qt::WheelFocus);
setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
}
KisEqualizerSlider::~KisEqualizerSlider()
......@@ -128,7 +128,12 @@ void KisEqualizerSlider::mouseReleaseEvent(QMouseEvent *ev)
QSize KisEqualizerSlider::sizeHint() const
{
return QSize(15, 100);
return QSize(25, 150);
}
QSize KisEqualizerSlider::minimumSizeHint() const
{
return QSize(10, 100);
}
void KisEqualizerSlider::paintEvent(QPaintEvent *event)
......
......@@ -37,6 +37,7 @@ public:
void paintEvent(QPaintEvent *event);
QSize sizeHint() const;
QSize minimumSizeHint() const;
void setRightmost(bool value);
......
......@@ -73,6 +73,8 @@ KisOnionSkinDialog::KisOnionSkinDialog(QWidget *parent) :
loadSettings();
KisOnionSkinCompositor::instance()->configChanged();
resize(sizeHint());
}
KisOnionSkinDialog::~KisOnionSkinDialog()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment