mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-03 21:41:26 +12:00
Fix pkg batch install dlg on linux
This commit is contained in:
parent
238298f695
commit
bd1fb86492
1 changed files with 11 additions and 1 deletions
|
@ -37,7 +37,14 @@ public:
|
||||||
|
|
||||||
// Adjust our painter parameters with some magic that looks good.
|
// Adjust our painter parameters with some magic that looks good.
|
||||||
// This is necessary so that we don't draw on top of the optional widget.
|
// This is necessary so that we don't draw on top of the optional widget.
|
||||||
const int margin = (option.rect.height() - opt.fontMetrics.height() - 4);
|
// If you're not happy with this code don't hesitate to contact Megamouse
|
||||||
|
#ifdef __linux__
|
||||||
|
static constexpr int margin_adjustement = 12;
|
||||||
|
#else
|
||||||
|
static constexpr int margin_adjustement = 4;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
const int margin = (option.rect.height() - opt.fontMetrics.height() - margin_adjustement);
|
||||||
QRect text_rect = style->subElementRect(QStyle::SE_ItemViewItemText, &opt, nullptr);
|
QRect text_rect = style->subElementRect(QStyle::SE_ItemViewItemText, &opt, nullptr);
|
||||||
|
|
||||||
if (index.column() != 0)
|
if (index.column() != 0)
|
||||||
|
@ -48,7 +55,10 @@ public:
|
||||||
text_rect.setTop(text_rect.top() + margin);
|
text_rect.setTop(text_rect.top() + margin);
|
||||||
|
|
||||||
painter->translate(text_rect.topLeft());
|
painter->translate(text_rect.topLeft());
|
||||||
|
|
||||||
|
#ifndef __linux__
|
||||||
painter->setClipRect(text_rect.translated(-text_rect.topLeft()));
|
painter->setClipRect(text_rect.translated(-text_rect.topLeft()));
|
||||||
|
#endif
|
||||||
|
|
||||||
// Create a context for our painter
|
// Create a context for our painter
|
||||||
QAbstractTextDocumentLayout::PaintContext context;
|
QAbstractTextDocumentLayout::PaintContext context;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue