Commit 50565a60 authored by Waqar Ahmed's avatar Waqar Ahmed
Browse files

Make sure to not draw over the icon if any


Signed-off-by: Waqar Ahmed's avatarWaqar Ahmed <waqar.17a@gmail.com>
parent 9f7508af
...@@ -234,6 +234,11 @@ public: ...@@ -234,6 +234,11 @@ public:
} }
} }
/** There might be an icon? Make sure to not draw over it **/
auto textRectX = options.widget->style()->subElementRect(QStyle::SE_ItemViewItemText, &options, options.widget).x();
auto width = textRectX - options.rect.x();
painter->translate(width, 0);
kfts::paintItemViewText(painter, text, options, formats); kfts::paintItemViewText(painter, text, options, formats);
painter->restore(); painter->restore();
......
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