mirror of
https://github.com/status-im/status-desktop.git
synced 2025-02-02 01:38:00 +00:00
chore(MembersDropdown): simplification based on workaround for QTBUG-87804 in StatusDropdown
Closes: #10661
This commit is contained in:
parent
3b2a5995aa
commit
46a2e9c083
@ -22,8 +22,6 @@ StatusDropdown {
|
|||||||
|
|
||||||
readonly property alias searchText: filterInput.text
|
readonly property alias searchText: filterInput.text
|
||||||
|
|
||||||
property bool fixedYPosition: !anchors.centerIn && margins < 0
|
|
||||||
|
|
||||||
enum Mode {
|
enum Mode {
|
||||||
Add, Update
|
Add, Update
|
||||||
}
|
}
|
||||||
@ -62,10 +60,6 @@ StatusDropdown {
|
|||||||
|
|
||||||
width: 295
|
width: 295
|
||||||
|
|
||||||
height: Math.min(
|
|
||||||
d.availableExternalHeight,
|
|
||||||
content.requestedHeight + d.vPadding)
|
|
||||||
|
|
||||||
padding: 11
|
padding: 11
|
||||||
bottomInset: 10
|
bottomInset: 10
|
||||||
bottomPadding: padding + bottomInset
|
bottomPadding: padding + bottomInset
|
||||||
@ -80,13 +74,7 @@ StatusDropdown {
|
|||||||
|
|
||||||
readonly property int sectionDelegateHeight: 40
|
readonly property int sectionDelegateHeight: 40
|
||||||
readonly property int delegateHeight: 47
|
readonly property int delegateHeight: 47
|
||||||
|
|
||||||
readonly property int vPadding: root.topPadding + root.bottomPadding
|
|
||||||
readonly property int scrollBarWidth: 4
|
readonly property int scrollBarWidth: 4
|
||||||
|
|
||||||
readonly property int availableExternalHeight:
|
|
||||||
(root.Overlay.overlay ? root.Overlay.overlay.height : 0) - root.bottomMargin -
|
|
||||||
(root.fixedYPosition ? contentItem.parent.y : root.topMargin)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
contentItem: ColumnLayout {
|
contentItem: ColumnLayout {
|
||||||
@ -96,14 +84,6 @@ StatusDropdown {
|
|||||||
height: root.availableHeight
|
height: root.availableHeight
|
||||||
clip: true
|
clip: true
|
||||||
|
|
||||||
readonly property int requestedHeight:
|
|
||||||
backButton.height +
|
|
||||||
spacing + filterInput.height +
|
|
||||||
spacing + (listView.count
|
|
||||||
? Math.min(listView.contentHeight, root.maximumListHeight)
|
|
||||||
: noContactsText.Layout.preferredHeight) +
|
|
||||||
spacing + addButton.height
|
|
||||||
|
|
||||||
StatusIconTextButton {
|
StatusIconTextButton {
|
||||||
id: backButton
|
id: backButton
|
||||||
|
|
||||||
@ -159,6 +139,8 @@ StatusDropdown {
|
|||||||
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
|
Layout.preferredHeight: Math.min(contentHeight,
|
||||||
|
root.maximumListHeight)
|
||||||
|
|
||||||
verticalScrollBar {
|
verticalScrollBar {
|
||||||
implicitWidth: d.scrollBarWidth + ScrollBar.vertical.padding * 2
|
implicitWidth: d.scrollBarWidth + ScrollBar.vertical.padding * 2
|
||||||
|
Loading…
x
Reference in New Issue
Block a user