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
Breeze Style for QQC2
Commits
2f18ccbd
Commit
2f18ccbd
authored
Mar 05, 2021
by
Noah Davis
🌵
Browse files
[MenuItem] Set reserve space properties in MenuItem
parent
6eaba9b2
Changes
1
Hide whitespace changes
Inline
Side-by-side
style/qtquickcontrols/MenuItem.qml
View file @
2f18ccbd
...
...
@@ -14,10 +14,27 @@ import "impl"
T.MenuItem
{
id
:
control
property
bool
__reserveSpaceForIndicator
:
true
property
bool
__reserveSpaceForIcon
:
false
property
bool
__reserveSpaceForArrow
:
true
Kirigami.Theme.colorSet
:
Kirigami
.
Theme
.
Button
property
bool
__reserveSpaceForIndicator
:
{
if
(
menu
&&
menu
.
hasOwnProperty
(
"
__hasIndicators
"
))
{
menu
.
__hasIndicators
|=
indicator
&&
indicator
.
visible
return
menu
.
__hasIndicators
}
return
false
}
property
bool
__reserveSpaceForIcon
:
{
if
(
menu
&&
menu
.
hasOwnProperty
(
"
__hasIcons
"
))
{
menu
.
__hasIcons
|=
contentItem
&&
contentItem
.
hasIcon
return
menu
.
__hasIcons
}
return
false
}
property
bool
__reserveSpaceForArrow
:
{
if
(
menu
&&
menu
.
hasOwnProperty
(
"
__hasArrows
"
))
{
menu
.
__hasArrows
|=
arrow
&&
arrow
.
visible
return
menu
.
__hasArrows
}
return
false
}
Kirigami.Theme.colorSet
:
control
.
down
||
control
.
highlighted
?
Kirigami
.
Theme
.
Button
:
-
1
Kirigami.Theme.inherit
:
!
background
||
!
background
.
visible
&&
!
(
control
.
highlighted
||
control
.
down
)
...
...
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