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 Workspace
Commits
331b9a9c
Commit
331b9a9c
authored
Mar 09, 2022
by
Kai Uwe Broulik
🍇
Committed by
Nate Graham
Mar 10, 2022
Browse files
[Clipboard Applet] Remember last used barcode type
parent
fad6830b
Pipeline
#147927
passed with stage
in 10 minutes and 42 seconds
Changes
2
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
applets/clipboard/contents/config/main.xml
0 → 100644
View file @
331b9a9c
<?xml version="1.0" encoding="UTF-8"?>
<kcfg
xmlns=
"http://www.kde.org/standards/kcfg/1.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://www.kde.org/standards/kcfg/1.0
http://www.kde.org/standards/kcfg/1.0/kcfg.xsd"
>
<kcfgfile
name=
""
/>
<group
name=
"General"
>
<entry
name=
"barcodeType"
type=
"Int"
>
<default>
1
</default>
<!-- Prison::BarcodeType::QRCode -->
</entry>
</group>
</kcfg>
applets/clipboard/contents/ui/BarcodePage.qml
View file @
331b9a9c
...
...
@@ -9,6 +9,7 @@ import QtQuick.Layouts 1.1
import
org
.
kde
.
plasma
.
core
2.0
as
PlasmaCore
import
org
.
kde
.
plasma
.
components
2.0
as
PlasmaComponents
// For ContextMenu
import
org
.
kde
.
plasma
.
components
3.0
as
PlasmaComponents3
import
org
.
kde
.
plasma
.
plasmoid
2.0
import
org
.
kde
.
kquickcontrolsaddons
2.0
import
org
.
kde
.
plasma
.
extras
2.0
as
PlasmaExtras
...
...
@@ -69,6 +70,7 @@ ColumnLayout {
});
menuItem
.
clicked
.
connect
(()
=>
{
barcodeItem
.
barcodeType
=
item
.
type
;
Plasmoid
.
configuration
.
barcodeType
=
item
.
type
;
});
menu
.
addMenuItem
(
menuItem
);
});
...
...
@@ -96,7 +98,7 @@ ColumnLayout {
id
:
barcodeItem
readonly
property
bool
valid
:
implicitWidth
>
0
&&
implicitHeight
>
0
&&
implicitWidth
<=
width
&&
implicitHeight
<=
height
anchors.fill
:
parent
barcodeType
:
P
ris
on
.
B
arcode
.
QRCod
e
barcodeType
:
P
lasmoid
.
configurati
on
.
b
arcode
Typ
e
// Cannot set visible to false as we need it to re-render when changing its size
opacity
:
valid
?
1
:
0
}
...
...
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