Skip to content
GitLab
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
14e2cf6a
Commit
14e2cf6a
authored
Dec 29, 2020
by
Jan Blackquill
🌈
Browse files
Improve presentation of error plasmoid
parent
0676646a
Changes
1
Hide whitespace changes
Inline
Side-by-side
desktoppackage/contents/applet/AppletError.qml
View file @
14e2cf6a
...
...
@@ -19,33 +19,64 @@
import
QtQuick
2.0
import
QtQuick
.
Layouts
1.1
import
org
.
kde
.
plasma
.
core
2.0
as
PlasmaCore
import
org
.
kde
.
plasma
.
components
2.0
as
PlasmaComponents
import
org
.
kde
.
plasma
.
components
3.0
as
PlasmaComponents
import
org
.
kde
.
plasma
.
extras
2.0
as
PlasmaExtras
RowLayout
{
Item
{
id
:
root
Layout.minimumWidth
:
PlasmaCore
.
Units
.
gridUnit
*
20
Layout.minimumHeight
:
PlasmaCore
.
Units
.
gridUnit
*
8
Layout.minimumWidth
:
PlasmaCore
.
Units
.
gridUnit
*
15
Layout.minimumHeight
:
PlasmaCore
.
Units
.
gridUnit
*
15
Layout.maximumWidth
:
PlasmaCore
.
Units
.
gridUnit
*
15
Layout.maximumHeight
:
PlasmaCore
.
Units
.
gridUnit
*
15
property
alias
reason
:
messageText
.
text
property
var
reason
property
var
errorInformation
:
{}
clip
:
true
PlasmaCore.IconItem
{
id
:
icon
Layout.alignment
:
Qt
.
AlignVCenter
Layout.minimumWidth
:
PlasmaCore
.
Units
.
iconSizes
.
huge
Layout.minimumHeight
:
PlasmaCore
.
Units
.
iconSizes
.
huge
source
:
"
dialog-error
"
}
ColumnLayout
{
anchors
{
verticalCenter
:
parent
.
verticalCenter
left
:
parent
.
left
right
:
parent
.
right
}
PlasmaCore.IconItem
{
Layout.minimumWidth
:
PlasmaCore
.
Units
.
iconSizes
.
huge
Layout.minimumHeight
:
PlasmaCore
.
Units
.
iconSizes
.
huge
source
:
"
data-warning
"
Layout.alignment
:
Qt
.
AlignHCenter
}
PlasmaExtras.Heading
{
text
:
i18nd
(
"
plasma_shell_org.kde.plasma.desktop
"
,
"
Oops! There was an error loading %1.
"
,
root
.
errorInformation
.
appletName
)
level
:
2
wrapMode
:
Text
.
Wrap
horizontalAlignment
:
Text
.
AlignHCenter
Layout.fillWidth
:
true
}
PlasmaComponents.Button
{
text
:
i18nd
(
"
plasma_shell_org.kde.plasma.desktop
"
,
"
Copy Error Details to Clipboard
"
)
icon.name
:
"
edit-copy
"
onClicked
:
copyHelper
.
copyText
()
Layout.alignment
:
Qt
.
AlignHCenter
}
PlasmaComponents.TextArea
{
id
:
copyHelper
visible
:
root
.
errorInformation
.
isDebugMode
text
:
root
.
errorInformation
.
errors
.
join
(
"
\n\n
"
)
readOnly
:
true
Layout.fillHeight
:
true
Layout.fillWidth
:
true
PlasmaComponents.TextArea
{
id
:
messageText
Layout.fillWidth
:
true
Layout.fillHeight
:
true
verticalAlignment
:
TextEdit
.
AlignVCenter
backgroundVisible
:
false
readOnly
:
true
width
:
parent
.
width
-
icon
.
width
wrapMode
:
Text
.
Wrap
function
copyText
()
{
selectAll
()
copy
()
}
}
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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