plasma: set the search widget of launcher applet focus policy to Qt::StrongFocus

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2024-05-20 00:55:18 +03:00
parent 1b74718163
commit 39f82eb6e1

View file

@ -1661,20 +1661,21 @@ LauncherAppletWidget::LauncherAppletWidget(LauncherApplet* auncherapplet)
m_iconwidget = new Plasma::IconWidget(this);
m_iconwidget->setAcceptHoverEvents(false);
m_iconwidget->setAcceptedMouseButtons(Qt::NoButton);
m_iconwidget->setFlag(QGraphicsItem::ItemIsFocusable, false);
m_iconwidget->setFocusPolicy(Qt::NoFocus);
m_iconwidget->setIcon(s_usericon);
m_toplayout->addItem(m_iconwidget);
m_label = new Plasma::Label(this);
m_label->setWordWrap(false);
m_label->nativeWidget()->setTextInteractionFlags(Qt::NoTextInteraction);
m_label->setFlag(QGraphicsItem::ItemIsFocusable, false);
m_label->setFocusPolicy(Qt::NoFocus);
m_toplayout->addItem(m_label);
m_toplayout->setAlignment(m_label, Qt::AlignCenter);
m_lineedit = new Plasma::LineEdit(this);
m_lineedit->setClickMessage(i18n("Search"));
m_lineedit->setClearButtonShown(true);
m_lineedit->setFocusPolicy(Qt::StrongFocus);
m_toplayout->addItem(m_lineedit);
m_toplayout->setAlignment(m_lineedit, Qt::AlignCenter);
setFocusProxy(m_lineedit);