This commit is contained in:
zhuzichu 2023-07-07 16:56:29 +08:00
parent 03771cd7c9
commit 26ad581072
4 changed files with 29 additions and 28 deletions

View File

@ -223,7 +223,7 @@ FluScrollablePage{
FluMenuItem{ FluMenuItem{
text:"Menu_4" text:"Menu_4"
onClicked: { onClicked: {
console.debug(parent.height)
} }
} }
} }
@ -241,20 +241,18 @@ FluScrollablePage{
Layout.topMargin: -1 Layout.topMargin: -1
code:'FluDropDownButton{ code:'FluDropDownButton{
text:"DropDownButton" text:"DropDownButton"
items:[ FluMenuItem{
FluMenuItem{ text:"Menu_1"
text:"Menu_1" },
}, FluMenuItem{
FluMenuItem{ text:"Menu_2"
text:"Menu_2" },
}, FluMenuItem{
FluMenuItem{ text:"Menu_3"
text:"Menu_3" },
}, FluMenuItem{
FluMenuItem{ text:"Menu_4"
text:"Menu_4" }
}
]
}' }'
} }

View File

@ -22,6 +22,10 @@ FluTextBox{
id:control_popup id:control_popup
y:control.height y:control.height
focus: false focus: false
// modal: true
// Overlay.modal: Item{}
padding: 0
enter: Transition { enter: Transition {
NumberAnimation { NumberAnimation {
property: "opacity" property: "opacity"
@ -30,15 +34,12 @@ FluTextBox{
duration: FluTheme.enableAnimation ? 83 : 0 duration: FluTheme.enableAnimation ? 83 : 0
} }
} }
background: FluRectangle{ contentItem: FluRectangle{
id:container
width: control.width
radius: [4,4,4,4] radius: [4,4,4,4]
FluShadow{ FluShadow{
radius: 4 radius: 4
} }
color: FluTheme.dark ? Qt.rgba(51/255,48/255,48/255,1) : Qt.rgba(248/255,250/255,253/255,1) color: FluTheme.dark ? Qt.rgba(51/255,48/255,48/255,1) : Qt.rgba(248/255,250/255,253/255,1)
height: 38*Math.min(Math.max(list_view.count,1),8)
ListView{ ListView{
id:list_view id:list_view
anchors.fill: parent anchors.fill: parent
@ -86,6 +87,11 @@ FluTextBox{
} }
} }
} }
background: Item{
id:container
implicitWidth: control.width
implicitHeight: 38*Math.min(Math.max(list_view.count,1),8)
}
} }
onTextChanged: { onTextChanged: {
loadData() loadData()

View File

@ -75,7 +75,7 @@ Button {
color: control.textColor color: control.textColor
} }
onClicked: { onClicked: {
if(items && menu.count !==0){ if(menu.count !==0){
var pos = control.mapToItem(null, 0, 0) var pos = control.mapToItem(null, 0, 0)
var containerHeight = menu.count*36 var containerHeight = menu.count*36
if(window.height>pos.y+control.height+containerHeight){ if(window.height>pos.y+control.height+containerHeight){

View File

@ -74,14 +74,11 @@ T.ScrollBar {
} }
,Transition { ,Transition {
to: "show" to: "show"
SequentialAnimation{ NumberAnimation {
PauseAnimation { duration: 100 } target: rect_bar
NumberAnimation { properties: vertical ? "width" : "height"
target: rect_bar duration: 167
properties: vertical ? "width" : "height" easing.type: Easing.OutCubic
duration: 167
easing.type: Easing.OutCubic
}
} }
} }
] ]