Fix menu width when a header item is present.
This commit is contained in:
parent
f0b16844b5
commit
33ed13f889
1 changed files with 3 additions and 1 deletions
|
@ -165,10 +165,10 @@ Item {
|
||||||
|
|
||||||
// optional header component:
|
// optional header component:
|
||||||
StyledText {
|
StyledText {
|
||||||
|
id: header
|
||||||
text: root.headerText
|
text: root.headerText
|
||||||
visible: root.haveHeader();
|
visible: root.haveHeader();
|
||||||
height: implicitHeight + Style.margin
|
height: implicitHeight + Style.margin
|
||||||
width: choicesColumn.width
|
|
||||||
|
|
||||||
// essentially the same mouse area as normal items
|
// essentially the same mouse area as normal items
|
||||||
MouseArea {
|
MouseArea {
|
||||||
|
@ -188,6 +188,8 @@ Item {
|
||||||
for (var i = 0; i < choicesRepeater.count; i++) {
|
for (var i = 0; i < choicesRepeater.count; i++) {
|
||||||
minWidth = Math.max(minWidth, choicesRepeater.itemAt(i).implicitWidth);
|
minWidth = Math.max(minWidth, choicesRepeater.itemAt(i).implicitWidth);
|
||||||
}
|
}
|
||||||
|
if (root.haveHeader())
|
||||||
|
minWidth = Math.max(minWidth, header.width);
|
||||||
return minWidth;
|
return minWidth;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue