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
Luca Carlon
Plasma Workspace
Commits
4be54997
Commit
4be54997
authored
Mar 05, 2022
by
Luca Carlon
Browse files
Add a combo box to select the size of systray popups.
parent
fcb522f8
Pipeline
#145264
passed with stage
in 5 minutes and 32 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
applets/systemtray/package/contents/config/main.xml
View file @
4be54997
...
...
@@ -37,6 +37,10 @@
<label>
Whether the popup should remain open when another window is activated
</label>
<default>
false
</default>
</entry>
<entry
name=
"plasmoidSize"
type=
"int"
>
<label>
The size of the popup containing the plasmoid
</label>
<default>
10
</default>
</entry>
</group>
</kcfg>
...
...
applets/systemtray/package/contents/ui/ConfigGeneral.qml
View file @
4be54997
...
...
@@ -14,6 +14,7 @@ import org.kde.kirigami 2.13 as Kirigami
ColumnLayout
{
property
bool
cfg_scaleIconsToFit
property
int
cfg_iconSpacing
property
int
cfg_plasmoidSize
Kirigami.FormLayout
{
Layout.fillHeight
:
true
...
...
@@ -81,5 +82,38 @@ ColumnLayout {
text
:
i18nc
(
"
@info:usagetip under a combobox when tablet mode is on
"
,
"
Automatically set to Large when in tablet mode
"
)
font
:
PlasmaCore
.
Theme
.
smallestFont
}
QQC2.ComboBox
{
Kirigami.FormData.label
:
i18nc
(
"
@label:listbox The size of the plasmoid popup
"
,
"
Popup size:
"
)
model
:
[
{
"
label
"
:
i18nc
(
"
@item:inlistbox Popup size
"
,
"
Small
"
),
"
plasmoidSize
"
:
10
},
{
"
label
"
:
i18nc
(
"
@item:inlistbox Popup size
"
,
"
Normal
"
),
"
plasmoidSize
"
:
13
},
{
"
label
"
:
i18nc
(
"
@item:inlistbox Popup size
"
,
"
Large
"
),
"
plasmoidSize
"
:
16
}
]
textRole
:
"
label
"
enabled
:
!
Kirigami
.
Settings
.
tabletMode
currentIndex
:
{
if
(
Kirigami
.
Settings
.
tabletMode
)
return
1
;
// Small
switch
(
cfg_plasmoidSize
)
{
case
10
:
return
0
;
// Small
case
13
:
return
1
;
// Normal
case
16
:
return
2
;
// Large
}
}
onActivated
:
cfg_plasmoidSize
=
model
[
currentIndex
][
"
plasmoidSize
"
]
}
}
}
applets/systemtray/package/contents/ui/ExpandedRepresentation.qml
View file @
4be54997
...
...
@@ -18,8 +18,9 @@ import org.kde.plasma.extras 2.0 as PlasmaExtras
Item
{
id
:
popup
//set width/height to avoid useless Dialog resize
readonly
property
int
defaultWidth
:
PlasmaCore
.
Units
.
gridUnit
*
24
readonly
property
int
defaultHeight
:
PlasmaCore
.
Units
.
gridUnit
*
24
readonly
property
int
sizeFactor
:
plasmoid
.
configuration
.
plasmoidSize
??
1
readonly
property
int
defaultWidth
:
PlasmaCore
.
Units
.
gridUnit
*
24
*
sizeFactor
/
10
readonly
property
int
defaultHeight
:
PlasmaCore
.
Units
.
gridUnit
*
24
*
sizeFactor
/
10
width
:
defaultWidth
Layout.minimumWidth
:
defaultWidth
...
...
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