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
ace8a4a3
Commit
ace8a4a3
authored
May 27, 2022
by
Luca Carlon
Committed by
Nate Graham
May 27, 2022
Browse files
Make widget popups resizable
See the discussion in
frameworks/plasma-framework!500
.
BUG: 411462
BUG: 332512
parent
012cfbbc
Pipeline
#181636
passed with stage
in 9 minutes and 23 seconds
Changes
11
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
applets/analog-clock/contents/ui/analogclock.qml
View file @
ace8a4a3
...
...
@@ -220,8 +220,12 @@ Item {
}
}
Plasmoid.fullRepresentation
:
PlasmaCalendar.MonthView
{
Layout.minimumWidth
:
PlasmaCore
.
Units
.
gridUnit
*
20
Layout.minimumHeight
:
PlasmaCore
.
Units
.
gridUnit
*
20
readonly
property
var
appletInterface
:
Plasmoid
.
self
Layout.minimumWidth
:
PlasmaCore
.
Units
.
gridUnit
*
22
Layout.maximumWidth
:
PlasmaCore
.
Units
.
gridUnit
*
80
Layout.minimumHeight
:
PlasmaCore
.
Units
.
gridUnit
*
22
Layout.maximumHeight
:
PlasmaCore
.
Units
.
gridUnit
*
40
today
:
dataSource
.
data
[
"
Local
"
][
"
DateTime
"
]
}
...
...
applets/batterymonitor/package/contents/ui/main.qml
View file @
ace8a4a3
...
...
@@ -239,11 +239,15 @@ Item {
}
Plasmoid.fullRepresentation
:
PopupDialog
{
id
:
dialogItem
readonly
property
var
appletInterface
:
Plasmoid
.
self
Layout.minimumWidth
:
PlasmaCore
.
Units
.
iconSizes
.
medium
*
9
Layout.maximumWidth
:
PlasmaCore
.
Units
.
gridUnit
*
80
Layout.minimumHeight
:
PlasmaCore
.
Units
.
gridUnit
*
15
// TODO Probably needs a sensible preferredHeight too
Layout.maximumHeight
:
PlasmaCore
.
Units
.
gridUnit
*
40
id
:
dialogItem
model
:
Plasmoid
.
expanded
?
batteries
:
null
focus
:
true
...
...
applets/calendar/package/contents/ui/main.qml
View file @
ace8a4a3
...
...
@@ -104,9 +104,12 @@ Item {
// sizing taken from digital clock
readonly
property
int
_minimumWidth
:
calendar
.
showWeekNumbers
?
Math
.
round
(
_minimumHeight
*
1.75
)
:
Math
.
round
(
_minimumHeight
*
1.5
)
readonly
property
int
_minimumHeight
:
PlasmaCore
.
Units
.
gridUnit
*
14
readonly
property
var
appletInterface
:
Plasmoid
.
self
Layout.preferredWidth
:
_minimumWidth
Layout.preferredHeight
:
Math
.
round
(
_minimumHeight
*
1.5
)
Layout.minimumWidth
:
_minimumWidth
Layout.maximumWidth
:
PlasmaCore
.
Units
.
gridUnit
*
80
Layout.minimumHeight
:
_minimumHeight
Layout.maximumHeight
:
PlasmaCore
.
Units
.
gridUnit
*
40
MonthView
{
id
:
calendar
...
...
applets/clipboard/contents/ui/clipboard.qml
View file @
ace8a4a3
...
...
@@ -84,8 +84,10 @@ Item {
Plasmoid.fullRepresentation
:
PlasmaExtras.Representation
{
id
:
dialogItem
Layout.minimumWidth
:
PlasmaCore
.
Units
.
gridUnit
*
5
Layout.minimumHeight
:
PlasmaCore
.
Units
.
gridUnit
*
5
Layout.minimumWidth
:
PlasmaCore
.
Units
.
gridUnit
*
24
Layout.minimumHeight
:
PlasmaCore
.
Units
.
gridUnit
*
24
Layout.maximumWidth
:
PlasmaCore
.
Units
.
gridUnit
*
80
Layout.maximumHeight
:
PlasmaCore
.
Units
.
gridUnit
*
40
collapseMarginsHint
:
true
focus
:
true
...
...
@@ -93,6 +95,7 @@ Item {
header
:
stack
.
currentItem
.
header
property
alias
listMargins
:
listItemSvg
.
margins
readonly
property
var
appletInterface
:
Plasmoid
.
self
PlasmaCore.FrameSvgItem
{
id
:
listItemSvg
...
...
applets/devicenotifier/package/contents/ui/FullRepresentation.qml
View file @
ace8a4a3
...
...
@@ -19,10 +19,13 @@ import org.kde.plasma.extras 2.0 as PlasmaExtras
PlasmaExtras.Representation
{
id
:
fullRep
readonly
property
var
appletInterface
:
Plasmoid
.
self
property
bool
spontaneousOpen
:
false
Layout.minimumWidth
:
PlasmaCore
.
Units
.
gridUnit
*
12
Layout.minimumHeight
:
PlasmaCore
.
Units
.
gridUnit
*
12
Layout.maximumWidth
:
PlasmaCore
.
Units
.
gridUnit
*
80
Layout.maximumHeight
:
PlasmaCore
.
Units
.
gridUnit
*
40
collapseMarginsHint
:
true
...
...
applets/digital-clock/package/contents/ui/CalendarView.qml
View file @
ace8a4a3
...
...
@@ -23,19 +23,16 @@ import org.kde.plasma.private.digitalclock 1.0
PlasmaExtras.Representation
{
id
:
calendar
// The "sensible" values
property
int
_minimumWidth
:
(
calendar
.
showAgenda
||
calendar
.
showClocks
)
?
PlasmaCore
.
Units
.
gridUnit
*
45
:
PlasmaCore
.
Units
.
gridUnit
*
22
property
int
_minimumHeight
:
PlasmaCore
.
Units
.
gridUnit
*
25
readonly
property
var
appletInterface
:
Plasmoid
.
self
PlasmaCore.ColorScope.inherit
:
false
PlasmaCore.ColorScope.colorGroup
:
PlasmaCore
.
Theme
.
NormalColorGroup
Layout.minimumWidth
:
_minimumWidth
Layout.minimumHeight
:
_minimumHeight
Layout.preferredWidth
:
_minimumWidth
Layout.preferredHeight
:
_minimumHeight
Layout.maximumWidth
:
_minimumWidth
Layout.maximumHeight
:
_minimumHeight
Layout.minimumWidth
:
(
calendar
.
showAgenda
||
calendar
.
showClocks
)
?
PlasmaCore
.
Units
.
gridUnit
*
45
:
PlasmaCore
.
Units
.
gridUnit
*
22
Layout.maximumWidth
:
PlasmaCore
.
Units
.
gridUnit
*
80
Layout.minimumHeight
:
PlasmaCore
.
Units
.
gridUnit
*
25
Layout.maximumHeight
:
PlasmaCore
.
Units
.
gridUnit
*
40
collapseMarginsHint
:
true
...
...
applets/kicker/plugin/submenu.cpp
View file @
ace8a4a3
...
...
@@ -18,7 +18,7 @@ SubMenu::SubMenu(QQuickItem *parent)
,
m_offset
(
0
)
,
m_facingLeft
(
false
)
{
setType
(
Popup
Menu
);
setType
(
Applet
Popup
);
}
SubMenu
::~
SubMenu
()
...
...
applets/mediacontroller/contents/ui/ExpandedRepresentation.qml
View file @
ace8a4a3
...
...
@@ -24,8 +24,10 @@ PlasmaExtras.Representation {
Layout.minimumWidth
:
PlasmaCore
.
Units
.
gridUnit
*
14
Layout.minimumHeight
:
PlasmaCore
.
Units
.
gridUnit
*
14
Layout.preferredWidth
:
Layout
.
minimumWidth
*
1.5
Layout.preferredHeight
:
Layout
.
minimumHeight
*
1.5
Layout.preferredWidth
:
PlasmaCore
.
Units
.
gridUnit
*
20
Layout.preferredHeight
:
PlasmaCore
.
Units
.
gridUnit
*
20
Layout.maximumWidth
:
PlasmaCore
.
Units
.
gridUnit
*
40
Layout.maximumHeight
:
PlasmaCore
.
Units
.
gridUnit
*
40
collapseMarginsHint
:
true
...
...
@@ -36,6 +38,7 @@ PlasmaExtras.Representation {
readonly
property
double
length
:
currentMetadata
?
currentMetadata
[
"
mpris:length
"
]
||
0
:
0
readonly
property
bool
canSeek
:
(
mpris2Source
.
currentData
&&
mpris2Source
.
currentData
.
CanSeek
)
||
false
readonly
property
bool
softwareRendering
:
GraphicsInfo
.
api
===
GraphicsInfo
.
Software
readonly
property
var
appletInterface
:
Plasmoid
.
self
// only show hours (the default for KFormat) when track is actually longer than an hour
readonly
property
int
durationFormattingOptions
:
length
>=
60
*
60
*
1000
*
1000
?
0
:
KCoreAddons
.
FormatTypes
.
FoldHours
...
...
applets/notifications/package/contents/ui/FullRepresentation.qml
View file @
ace8a4a3
...
...
@@ -24,9 +24,14 @@ PlasmaExtras.Representation {
// TODO these should be configurable in the future
readonly
property
int
dndMorningHour
:
6
readonly
property
int
dndEveningHour
:
20
implicitWidth
:
PlasmaCore
.
Units
.
gridUnit
*
18
implicitHeight
:
PlasmaCore
.
Units
.
gridUnit
*
24
readonly
property
var
appletInterface
:
Plasmoid
.
self
Layout.minimumWidth
:
PlasmaCore
.
Units
.
gridUnit
*
12
Layout.minimumHeight
:
PlasmaCore
.
Units
.
gridUnit
*
12
Layout.preferredWidth
:
PlasmaCore
.
Units
.
gridUnit
*
18
Layout.preferredHeight
:
PlasmaCore
.
Units
.
gridUnit
*
24
Layout.maximumWidth
:
PlasmaCore
.
Units
.
gridUnit
*
80
Layout.maximumHeight
:
PlasmaCore
.
Units
.
gridUnit
*
40
Layout.fillHeight
:
Plasmoid
.
formFactor
===
PlasmaCore
.
Types
.
Vertical
...
...
applets/systemtray/package/contents/ui/ExpandedRepresentation.qml
View file @
ace8a4a3
...
...
@@ -7,6 +7,7 @@
import
QtQuick
2.12
import
QtQuick
.
Layouts
1.12
import
QtQuick
.
Window
2.15
import
org
.
kde
.
plasma
.
core
2.0
as
PlasmaCore
// We still need PC2 here for that version of Menu, as PC2 Menu is still very problematic with QActions
...
...
@@ -18,19 +19,12 @@ import org.kde.plasma.plasmoid 2.0
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
width
:
defaultWidth
Layout.minimumWidth
:
defaultWidth
Layout.preferredWidth
:
defaultWidth
Layout.maximumWidth
:
defaultWidth
height
:
defaultHeight
Layout.minimumHeight
:
defaultHeight
Layout.preferredHeight
:
defaultHeight
Layout.maximumHeight
:
defaultHeight
Layout.minimumWidth
:
PlasmaCore
.
Units
.
gridUnit
*
24
Layout.maximumWidth
:
PlasmaCore
.
Units
.
gridUnit
*
80
Layout.minimumHeight
:
PlasmaCore
.
Units
.
gridUnit
*
24
Layout.maximumHeight
:
PlasmaCore
.
Units
.
gridUnit
*
40
property
alias
hiddenLayout
:
hiddenItemsView
.
layout
property
alias
plasmoidContainer
:
container
...
...
applets/systemtray/package/contents/ui/main.qml
View file @
ace8a4a3
...
...
@@ -7,6 +7,7 @@
import
QtQuick
2.5
import
QtQuick
.
Layouts
1.1
import
QtQuick
.
Window
2.15
import
org
.
kde
.
plasma
.
core
2.1
as
PlasmaCore
import
org
.
kde
.
plasma
.
plasmoid
2.0
import
org
.
kde
.
draganddrop
2.0
as
DnD
...
...
@@ -228,6 +229,8 @@ MouseArea {
hideOnWindowDeactivate
:
!
Plasmoid
.
configuration
.
pin
visible
:
systemTrayState
.
expanded
backgroundHints
:
(
Plasmoid
.
containmentDisplayHints
&
PlasmaCore
.
Types
.
DesktopFullyCovered
)
?
PlasmaCore
.
Dialog
.
SolidBackground
:
PlasmaCore
.
Dialog
.
StandardBackground
type
:
PlasmaCore
.
Dialog
.
AppletPopup
appletInterface
:
Plasmoid
.
self
onVisibleChanged
:
{
systemTrayState
.
expanded
=
visible
;
...
...
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