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

View File

@ -22,6 +22,10 @@ FluTextBox{
id:control_popup
y:control.height
focus: false
// modal: true
// Overlay.modal: Item{}
padding: 0
enter: Transition {
NumberAnimation {
property: "opacity"
@ -30,15 +34,12 @@ FluTextBox{
duration: FluTheme.enableAnimation ? 83 : 0
}
}
background: FluRectangle{
id:container
width: control.width
contentItem: FluRectangle{
radius: [4,4,4,4]
FluShadow{
radius: 4
}
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{
id:list_view
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: {
loadData()

View File

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

View File

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