Commit f7a824b7 authored by Elvis Angelaccio's avatar Elvis Angelaccio

Merge branch 'Applications/18.12'

parents ca558194 037d2c99
......@@ -670,7 +670,7 @@ void KItemListView::paint(QPainter* painter, const QStyleOptionGraphicsItem* opt
}
QStyleOptionRubberBand opt;
opt.initFrom(widget);
initStyleOption(&opt);
opt.shape = QRubberBand::Rectangle;
opt.opaque = false;
opt.rect = rubberBandRect.toRect();
......
......@@ -127,7 +127,7 @@ void KItemListWidget::paint(QPainter* painter, const QStyleOptionGraphicsItem* o
if (m_current && m_editedRole.isEmpty()) {
QStyleOptionFocusRect focusRectOption;
focusRectOption.initFrom(widget);
initStyleOption(&focusRectOption);
focusRectOption.rect = textFocusRect().toRect();
focusRectOption.state = QStyle::State_Enabled | QStyle::State_Item | QStyle::State_KeyboardFocusChange;
if (m_selected) {
......@@ -517,11 +517,11 @@ void KItemListWidget::clearHoverCache()
void KItemListWidget::drawItemStyleOption(QPainter* painter, QWidget* widget, QStyle::State styleState)
{
QStyleOptionViewItem viewItemOption;
viewItemOption.initFrom(widget);
initStyleOption(&viewItemOption);
viewItemOption.state = styleState;
viewItemOption.viewItemPosition = QStyleOptionViewItem::OnlyOne;
viewItemOption.showDecorationSelected = true;
viewItemOption.rect = selectionRect().toRect();
widget->style()->drawPrimitive(QStyle::PE_PanelItemViewItem, &viewItemOption, painter, widget);
style()->drawPrimitive(QStyle::PE_PanelItemViewItem, &viewItemOption, painter, widget);
}
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