plasma: remove unused private methods

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2024-04-11 15:03:41 +03:00
parent 2b45ac1a73
commit 222c0282be
3 changed files with 1 additions and 30 deletions

View file

@ -1065,32 +1065,6 @@ void IconWidgetPrivate::layoutTextItems(const QStyleOptionGraphicsItem *option,
//kDebug() << "final position is" << labelLayout->position();
}
QBrush IconWidgetPrivate::foregroundBrush(const QStyleOptionGraphicsItem *option) const
{
const QPalette::ColorGroup group = option->state & QStyle::State_Enabled ?
QPalette::Normal : QPalette::Disabled;
// Always use the highlight color for selected items
if (option->state & QStyle::State_Selected) {
return option->palette.brush(group, QPalette::HighlightedText);
}
return option->palette.brush(group, QPalette::Text);
}
QBrush IconWidgetPrivate::backgroundBrush(const QStyleOptionGraphicsItem *option) const
{
const QPalette::ColorGroup group = option->state & QStyle::State_Enabled ?
QPalette::Normal : QPalette::Disabled;
QBrush background(Qt::NoBrush);
// Always use the highlight color for selected items
if (option->state & QStyle::State_Selected) {
background = option->palette.brush(group, QPalette::Highlight);
}
return background;
}
void IconWidgetPrivate::drawTextItems(QPainter *painter,
const QStyleOptionGraphicsItem *option,
const QTextLayout &labelLayout,

View file

@ -153,9 +153,6 @@ public:
QSizeF displaySizeHint(const QStyleOptionGraphicsItem *option, const qreal width) const;
QBrush foregroundBrush(const QStyleOptionGraphicsItem *option) const;
QBrush backgroundBrush(const QStyleOptionGraphicsItem *option) const;
QString elidedText(QTextLayout &layout,
const QSizeF &maxSize) const;

View file

@ -95,7 +95,7 @@ Label::Label(QGraphicsWidget *parent)
: QGraphicsProxyWidget(parent),
d(new LabelPrivate(this))
{
QLabel *native = new QLabel;
QLabel *native = new QLabel();
native->setWindowFlags(native->windowFlags()|Qt::BypassGraphicsProxyWidget);
native->setAttribute(Qt::WA_NoSystemBackground);