Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Plasma
Plasma Desktop
Commits
aff12784
Commit
aff12784
authored
Mar 24, 2021
by
Bharadwaj Raju
📚
Committed by
Nate Graham
Apr 23, 2021
Browse files
Use independent toolTipDelegate for each item.
BUG: 434657
parent
603c0b5a
Changes
4
Hide whitespace changes
Inline
Side-by-side
applets/taskmanager/package/contents/ui/Task.qml
View file @
aff12784
...
...
@@ -314,6 +314,11 @@ MouseArea {
Component.onCompleted
:
timer
.
start
()
}
}
ToolTipDelegate
{
id
:
toolTipDelegate
visible
:
false
}
PlasmaCore.FrameSvgItem
{
id
:
frame
...
...
applets/taskmanager/package/contents/ui/main.qml
View file @
aff12784
...
...
@@ -221,7 +221,6 @@ MouseArea {
id
:
backend
taskManagerItem
:
tasks
toolTipItem
:
toolTipDelegate
groupDialog
:
groupDialog
highlightWindows
:
plasmoid
.
configuration
.
highlightWindows
...
...
@@ -410,12 +409,6 @@ MouseArea {
}
}
ToolTipDelegate
{
id
:
toolTipDelegate
visible
:
false
}
TaskList
{
id
:
taskList
...
...
applets/taskmanager/plugin/backend.cpp
View file @
aff12784
...
...
@@ -109,22 +109,6 @@ void Backend::setTaskManagerItem(QQuickItem *item)
}
}
QQuickItem
*
Backend
::
toolTipItem
()
const
{
return
m_toolTipItem
;
}
void
Backend
::
setToolTipItem
(
QQuickItem
*
item
)
{
if
(
item
!=
m_toolTipItem
)
{
m_toolTipItem
=
item
;
connect
(
item
,
&
QQuickItem
::
windowChanged
,
this
,
&
Backend
::
toolTipWindowChanged
);
emit
toolTipItemChanged
();
}
}
QQuickWindow
*
Backend
::
groupDialog
()
const
{
return
m_groupDialog
;
...
...
@@ -432,13 +416,6 @@ QVariantList Backend::recentDocumentActions(const QUrl &launcherUrl, QObject *pa
return
actions
;
}
void
Backend
::
toolTipWindowChanged
(
QQuickWindow
*
window
)
{
Q_UNUSED
(
window
)
updateWindowHighlight
();
}
void
Backend
::
handleRecentDocumentAction
()
const
{
const
QAction
*
action
=
qobject_cast
<
QAction
*>
(
sender
());
...
...
@@ -605,4 +582,28 @@ void Backend::updateWindowHighlight()
auto
message
=
QDBusMessage
::
createMethodCall
(
highlightWindowName
,
highlightWindowPath
,
highlightWindowInterface
,
QStringLiteral
(
"highlightWindows"
));
message
<<
(
m_highlightWindows
?
m_windowsToHighlight
:
QStringList
());
QDBusConnection
::
sessionBus
().
asyncCall
(
message
);
if
(
!
m_highlightWindows
)
{
if
(
m_panelWinId
)
{
KWindowEffects
::
highlightWindows
(
m_panelWinId
,
QList
<
WId
>
());
m_panelWinId
=
0
;
}
return
;
}
if
(
m_taskManagerItem
&&
m_taskManagerItem
->
window
())
{
m_panelWinId
=
m_taskManagerItem
->
window
()
->
winId
();
}
else
{
return
;
}
QList
<
WId
>
windows
=
m_windowsToHighlight
;
if
(
!
windows
.
isEmpty
()
&&
m_groupDialog
)
{
windows
.
append
(
m_groupDialog
->
winId
());
}
KWindowEffects
::
highlightWindows
(
m_panelWinId
,
windows
);
}
applets/taskmanager/plugin/backend.h
View file @
aff12784
...
...
@@ -42,7 +42,6 @@ class Backend : public QObject
Q_OBJECT
Q_PROPERTY
(
QQuickItem
*
taskManagerItem
READ
taskManagerItem
WRITE
setTaskManagerItem
NOTIFY
taskManagerItemChanged
)
Q_PROPERTY
(
QQuickItem
*
toolTipItem
READ
toolTipItem
WRITE
setToolTipItem
NOTIFY
toolTipItemChanged
)
Q_PROPERTY
(
QQuickWindow
*
groupDialog
READ
groupDialog
WRITE
setGroupDialog
NOTIFY
groupDialogChanged
)
Q_PROPERTY
(
bool
highlightWindows
READ
highlightWindows
WRITE
setHighlightWindows
NOTIFY
highlightWindowsChanged
)
Q_PROPERTY
(
bool
canPresentWindows
READ
canPresentWindows
NOTIFY
canPresentWindowsChanged
)
...
...
@@ -65,9 +64,6 @@ public:
QQuickItem
*
taskManagerItem
()
const
;
void
setTaskManagerItem
(
QQuickItem
*
item
);
QQuickItem
*
toolTipItem
()
const
;
void
setToolTipItem
(
QQuickItem
*
item
);
QQuickWindow
*
groupDialog
()
const
;
void
setGroupDialog
(
QQuickWindow
*
dialog
);
...
...
@@ -101,7 +97,6 @@ public Q_SLOTS:
Q_SIGNALS:
void
taskManagerItemChanged
()
const
;
void
toolTipItemChanged
()
const
;
void
groupDialogChanged
()
const
;
void
highlightWindowsChanged
()
const
;
void
addLauncher
(
const
QUrl
&
url
)
const
;
...
...
@@ -110,7 +105,6 @@ Q_SIGNALS:
void
showAllPlaces
();
private
Q_SLOTS
:
void
toolTipWindowChanged
(
QQuickWindow
*
window
);
void
handleRecentDocumentAction
()
const
;
private:
...
...
@@ -119,7 +113,6 @@ private:
QVariantList
systemSettingsActions
(
QObject
*
parent
)
const
;
QQuickItem
*
m_taskManagerItem
=
nullptr
;
QQuickItem
*
m_toolTipItem
=
nullptr
;
QQuickWindow
*
m_groupDialog
=
nullptr
;
bool
m_highlightWindows
;
QStringList
m_windowsToHighlight
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment