Commit 74aad24e authored by Dmitry Kazakov's avatar Dmitry Kazakov
Browse files

Make all the lines of paintop options look the same

Grid and Shape paintops do not have any checkable options, so their
option lists look very different from the other paitops.
parent 7b4d047d
...@@ -86,6 +86,16 @@ QSize KisCategorizedItemDelegate::sizeHint(const QStyleOptionViewItem& option, c ...@@ -86,6 +86,16 @@ QSize KisCategorizedItemDelegate::sizeHint(const QStyleOptionViewItem& option, c
for(int i=0; i<index.model()->rowCount(); i++) { for(int i=0; i<index.model()->rowCount(); i++) {
QSize indexSize = QStyledItemDelegate::sizeHint(option, index.model()->index(i, 0)); QSize indexSize = QStyledItemDelegate::sizeHint(option, index.model()->index(i, 0));
m_minimumItemHeight = qMax(m_minimumItemHeight, indexSize.height()); m_minimumItemHeight = qMax(m_minimumItemHeight, indexSize.height());
/**
* Make all the items, including the ones having
* checkboxes look the same.
*/
QStyle *style = QApplication::style();
QStyleOptionButton so;
QSize size = style->sizeFromContents(QStyle::CT_CheckBox, &so, QSize(), 0);
m_minimumItemHeight = qMax(size.height(), m_minimumItemHeight);
} }
} }
return QSize(QStyledItemDelegate::sizeHint(option, index).width(), m_minimumItemHeight); return QSize(QStyledItemDelegate::sizeHint(option, index).width(), m_minimumItemHeight);
......
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