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 Workspace
Commits
ff595625
Commit
ff595625
authored
Feb 13, 2021
by
Kai Uwe Broulik
🍇
Browse files
[Notifications] Remove QImageItem for custom notification pixmap
IconItem can render those just fine, simplifies the code a little.
parent
86202ccb
Changes
1
Hide whitespace changes
Inline
Side-by-side
applets/notifications/package/contents/ui/NotificationItem.qml
View file @
ff595625
...
...
@@ -254,7 +254,7 @@ ColumnLayout {
Layout.topMargin
:
units
.
smallSpacing
Layout.bottomMargin
:
units
.
smallSpacing
visible
:
iconItem
.
active
||
imageItem
.
active
visible
:
iconItem
.
active
PlasmaCore.IconItem
{
id
:
iconItem
...
...
@@ -263,30 +263,9 @@ ColumnLayout {
anchors.fill
:
parent
usesPlasmaTheme
:
false
smooth
:
true
source
:
{
var
icon
=
notificationItem
.
icon
;
if
(
typeof
icon
!==
"
string
"
)
{
// displayed by QImageItem below
return
""
;
}
// don't show a generic "info" icon since this is a notification already
if
(
icon
===
"
dialog-information
"
)
{
return
""
;
}
return
icon
;
}
visible
:
active
}
KQCAddons.QImageItem
{
id
:
imageItem
readonly
property
bool
active
:
!
null
&&
nativeWidth
>
0
anchors.fill
:
parent
smooth
:
true
fillMode
:
KQCAddons
.
QImageItem
.
PreserveAspectFit
// don't show a generic "info" icon since this is a notification already
source
:
notificationItem
.
icon
!==
"
dialog-information
"
?
notificationItem
.
icon
:
""
visible
:
active
image
:
typeof
notificationItem
.
icon
===
"
object
"
?
notificationItem
.
icon
:
undefined
}
// JobItem reparents a file icon here for finished jobs with one total file
...
...
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