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
86be9096
Commit
86be9096
authored
Apr 29, 2021
by
Janet Blackquill
🌈
Committed by
Nate Graham
Apr 29, 2021
Browse files
Add button to view contents of AppletError
parent
f4ddcdae
Changes
1
Hide whitespace changes
Inline
Side-by-side
desktoppackage/contents/applet/AppletError.qml
View file @
86be9096
...
...
@@ -18,6 +18,7 @@
import
QtQuick
2.0
import
QtQuick
.
Layouts
1.1
import
QtQuick
.
Window
2.15
import
org
.
kde
.
plasma
.
core
2.0
as
PlasmaCore
import
org
.
kde
.
plasma
.
components
3.0
as
PlasmaComponents
import
org
.
kde
.
plasma
.
extras
2.0
as
PlasmaExtras
...
...
@@ -34,49 +35,83 @@ Item {
clip
:
true
ColumnLayout
{
PlasmaComponents.ToolButton
{
icon.name
:
"
arrow-up
"
visible
:
!
dialog
.
visible
onClicked
:
dialog
.
visible
=
true
anchors
{
verticalCenter
:
parent
.
verticalCenter
left
:
parent
.
left
bottom
:
parent
.
bottom
right
:
parent
.
right
}
}
PlasmaCore.IconItem
{
Layout.minimumWidth
:
PlasmaCore
.
Units
.
iconSizes
.
huge
Layout.minimumHeight
:
PlasmaCore
.
Units
.
iconSizes
.
huge
source
:
"
dialog-error
"
Layout.alignment
:
Qt
.
AlignHCenter
}
RowLayout
{
anchors.fill
:
parent
PlasmaExtras.Heading
{
text
:
i18nd
(
"
plasma_shell_org.kde.plasma.desktop
"
,
"
Sorry! There was an error loading %1.
"
,
root
.
errorInformation
.
appletName
)
level
:
2
wrapMode
:
Text
.
Wrap
horizontalAlignment
:
Text
.
AlignHCenter
ColumnLayout
{
Layout.alignment
:
Qt
.
AlignHCenter
|
Qt
.
AlignVCenter
Layout.fillWidth
:
true
}
PlasmaComponents.Button
{
text
:
i18nd
(
"
plasma_shell_org.kde.plasma.desktop
"
,
"
Copy Error Details to Clipboard
"
)
icon.name
:
"
edit-copy
"
PlasmaCore.IconItem
{
Layout.minimumWidth
:
PlasmaCore
.
Units
.
iconSizes
.
huge
Layout.minimumHeight
:
PlasmaCore
.
Units
.
iconSizes
.
huge
source
:
"
dialog-error
"
Layout.alignment
:
Qt
.
AlignHCenter
}
PlasmaExtras.Heading
{
text
:
i18nd
(
"
plasma_shell_org.kde.plasma.desktop
"
,
"
Sorry! There was an error loading %1.
"
,
root
.
errorInformation
.
appletName
)
level
:
2
wrapMode
:
Text
.
Wrap
horizontalAlignment
:
Text
.
AlignHCenter
Layout.fillWidth
:
true
}
onClicked
:
copyHelper
.
copyText
()
Layout.alignment
:
Qt
.
AlignHCenter
}
PlasmaComponents.Button
{
text
:
i18nd
(
"
plasma_shell_org.kde.plasma.desktop
"
,
"
Copy Error Details to Clipboard
"
)
icon.name
:
"
edit-copy
"
PlasmaComponents.TextArea
{
id
:
copyHelp
er
visible
:
root
.
errorInformation
.
isDebugMode
onClicked
:
copyHelper
.
copyText
()
Layout.alignment
:
Qt
.
AlignHCent
er
}
text
:
root
.
errorInformation
.
errors
.
join
(
"
\n\n
"
)
readOnly
:
true
Layout.fillHeight
:
true
Layout.fillWidth
:
true
Window
{
id
:
dialog
function
copyText
()
{
selectAll
()
copy
()
width
:
PlasmaCore
.
Units
.
gridUnit
*
20
height
:
PlasmaCore
.
Units
.
gridUnit
*
20
visible
:
false
color
:
PlasmaCore
.
Theme
.
backgroundColor
PlasmaComponents.TextArea
{
anchors.fill
:
parent
text
:
root
.
errorInformation
.
errors
.
join
(
"
\n\n
"
)
readOnly
:
true
wrapMode
:
TextEdit
.
Wrap
background
:
null
}
}
PlasmaComponents.TextArea
{
id
:
copyHelper
visible
:
root
.
errorInformation
.
isDebugMode
wrapMode
:
TextEdit
.
Wrap
text
:
root
.
errorInformation
.
errors
.
join
(
"
\n\n
"
)
readOnly
:
true
Layout.fillHeight
:
true
Layout.fillWidth
:
true
function
copyText
()
{
selectAll
()
copy
()
}
}
}
}
}
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