mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-10-02 16:44:16 +02:00
Loaded the traced icons by theme name and removed the PNGs they replace
This commit is contained in:
@@ -32,6 +32,13 @@ void ElementPreviewDelegate::initStyleOption(QStyleOptionViewItem *option,
|
||||
const QModelIndex &index) const
|
||||
{
|
||||
QStyledItemDelegate::initStyleOption(option, index);
|
||||
|
||||
// The view's icon size is set for the element previews. A theme icon
|
||||
// (a folder, a collection root) would scale up to fill it, so those
|
||||
// stay at 16 px.
|
||||
if (!option->icon.name().isEmpty())
|
||||
option->decorationSize = QSize(16, 16);
|
||||
|
||||
if (option->icon.isNull() || !QET::Palette::isDark(option->palette))
|
||||
return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user