Commit 71063ae3 authored by Boudewijn Rempt's avatar Boudewijn Rempt

Remove useless calls to QApplication::globalStrut

This returns QSize(0,0) in all cases, so it's useless to call it.
And it's going to be deprecated anyway.
parent f9e85f48
......@@ -67,8 +67,7 @@ QSize KisCmbGradient::sizeHint() const
QStyleOptionComboBox options;
options.initFrom(this);
return style()->sizeFromContents(QStyle::CT_ComboBox, &options,
QSize(maxW, maxH), this).expandedTo(QApplication::globalStrut());
return style()->sizeFromContents(QStyle::CT_ComboBox, &options, QSize(maxW, maxH), this);
}
void KisCmbGradient::resizeEvent(QResizeEvent *event)
......
......@@ -344,5 +344,5 @@ QSize KisColorFilterCombo::sizeHint() const
const QSize originalHint = QComboBox::sizeHint();
QSize sh(3 * arrowSize, originalHint.height());
return sh.expandedTo(QApplication::globalStrut());
return sh;
}
......@@ -619,7 +619,7 @@ QSize KisAbstractSliderSpinBox::minimumSizeHint() const
QSize KisAbstractSliderSpinBox::minimumSize() const
{
return QWidget::minimumSize().expandedTo(minimumSizeHint());
return QWidget::minimumSize();
}
QStyleOptionSpinBox KisAbstractSliderSpinBox::spinBoxOptions() const
......
......@@ -346,8 +346,7 @@ int KisStopGradientSliderWidget::minimalHeight() const
const int h = fm.height();
QStyleOptionToolButton opt;
QSize sz = (style()->sizeFromContents(QStyle::CT_ToolButton, &opt, QSize(h, h), this).
expandedTo(QApplication::globalStrut()));
QSize sz = style()->sizeFromContents(QStyle::CT_ToolButton, &opt, QSize(h, h), this);
return sz.height() + m_handleSize.height();
}
......
......@@ -104,7 +104,7 @@ QSize KoSliderCombo::minimumSizeHint() const
opt.editable = true;
sh = style()->sizeFromContents(QStyle::CT_ComboBox, &opt, sh, this);
return sh.expandedTo(QApplication::globalStrut());
return sh;
}
void KoSliderCombo::KoSliderComboPrivate::showPopup()
......
......@@ -264,16 +264,14 @@ QSize KisColorButton::sizeHint() const
{
QStyleOptionButton opt;
d->initStyleOption(&opt);
return style()->sizeFromContents(QStyle::CT_PushButton, &opt, QSize(40, 15), this).
expandedTo(QApplication::globalStrut());
return style()->sizeFromContents(QStyle::CT_PushButton, &opt, QSize(40, 15), this);
}
QSize KisColorButton::minimumSizeHint() const
{
QStyleOptionButton opt;
d->initStyleOption(&opt);
return style()->sizeFromContents(QStyle::CT_PushButton, &opt, QSize(3, 3), this).
expandedTo(QApplication::globalStrut());
return style()->sizeFromContents(QStyle::CT_PushButton, &opt, QSize(3, 3), this);
}
void KisColorButton::dragEnterEvent(QDragEnterEvent *event)
......
......@@ -96,8 +96,7 @@ QSize KisSqueezedComboBox::sizeHint() const
QStyleOptionComboBox options;
options.initFrom(this);
return style()->sizeFromContents(QStyle::CT_ComboBox, &options,
QSize(maxW, maxH), this).expandedTo(QApplication::globalStrut());
return style()->sizeFromContents(QStyle::CT_ComboBox, &options, QSize(maxW, maxH), this);
}
void KisSqueezedComboBox::insertSqueezedItem(const QString& newItem, int index, QVariant userData)
......
......@@ -382,8 +382,7 @@ QSize RAbstractSliderSpinBox::sizeHint() const
spinOpts.rect = rect();
return style()->sizeFromContents(QStyle::CT_SpinBox, &spinOpts, hint, 0)
.expandedTo(QApplication::globalStrut());
return style()->sizeFromContents(QStyle::CT_SpinBox, &spinOpts, hint, 0);
}
QSize RAbstractSliderSpinBox::minimumSizeHint() const
......
......@@ -99,8 +99,7 @@ QSize SqueezedComboBox::sizeHint() const
QStyleOptionComboBox options;
options.initFrom(this);
return style()->sizeFromContents(QStyle::CT_ComboBox, &options,
QSize(maxW, maxH), this).expandedTo(QApplication::globalStrut());
return style()->sizeFromContents(QStyle::CT_ComboBox, &options, QSize(maxW, maxH), this);
}
void SqueezedComboBox::insertSqueezedItem(const QString& newItem, int index,
......
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