mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-20 21:33:27 -07:00
Merge pull request #13099 from jagannatharjun/fix-log
Use delegate provided rect for textRect in LogItemDelegate
This commit is contained in:
commit
83f1028ff7
1 changed files with 1 additions and 2 deletions
|
@ -71,8 +71,7 @@ namespace
|
||||||
QStyledItemDelegate::paint(painter, option, index); // paints background, focus rect and selection rect
|
QStyledItemDelegate::paint(painter, option, index); // paints background, focus rect and selection rect
|
||||||
|
|
||||||
const QStyle *style = option.widget ? option.widget->style() : QApplication::style();
|
const QStyle *style = option.widget ? option.widget->style() : QApplication::style();
|
||||||
const QRect textRect = style->subElementRect(QStyle::SE_ItemViewItemText, &option, option.widget)
|
const QRect textRect = option.rect.adjusted(1, 0, 0, 0); // shift 1 to avoid text being too close to focus rect
|
||||||
.adjusted(1, 0, 0, 0); // shift 1 to avoid text being too close to focus rect
|
|
||||||
|
|
||||||
// for unknown reasons (fixme) painter won't accept some font properties
|
// for unknown reasons (fixme) painter won't accept some font properties
|
||||||
// until they are set explicitly, and we have to manually set some font properties
|
// until they are set explicitly, and we have to manually set some font properties
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue