mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-20 03:25:16 +00:00
Qt: fix richtext_item_delegate palette
We have to use the styled palette instead of the default palette in order to fix the style of lists as seen the pkg installer.
This commit is contained in:
parent
c549d7154b
commit
d63a712cc5
2 changed files with 4 additions and 6 deletions
|
@ -135,7 +135,7 @@ log_frame::log_frame(std::shared_ptr<gui_settings> guiSettings, QWidget *parent)
|
|||
}
|
||||
else
|
||||
{
|
||||
m_tty_input->setPlaceholderText(tr("All User Channels"));
|
||||
m_tty_input->setPlaceholderText(tr("All user channels"));
|
||||
}
|
||||
|
||||
QVBoxLayout* tty_layout = new QVBoxLayout();
|
||||
|
|
|
@ -51,16 +51,14 @@ public:
|
|||
painter->setClipRect(text_rect.translated(-text_rect.topLeft()));
|
||||
|
||||
// Create a context for our painter
|
||||
const QAbstractTextDocumentLayout::PaintContext context;
|
||||
QAbstractTextDocumentLayout::PaintContext context;
|
||||
|
||||
// We can change the text color based on state (Unused because it didn't look good)
|
||||
//context.palette.setColor(QPalette::Text, option.palette.color(QPalette::Active, (option.state & QStyle::State_Selected) ? QPalette::HighlightedText : QPalette::Text));
|
||||
// Apply the styled palette
|
||||
context.palette = opt.palette;
|
||||
|
||||
// Draw the text
|
||||
m_document->documentLayout()->draw(painter, context);
|
||||
|
||||
painter->restore();
|
||||
|
||||
//QStyledItemDelegate::paint(painter, opt, index); // Unused
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue