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,7 +241,6 @@ FluScrollablePage{
Layout.topMargin: -1 Layout.topMargin: -1
code:'FluDropDownButton{ code:'FluDropDownButton{
text:"DropDownButton" text:"DropDownButton"
items:[
FluMenuItem{ FluMenuItem{
text:"Menu_1" text:"Menu_1"
}, },
@ -254,7 +253,6 @@ FluScrollablePage{
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,8 +74,6 @@ T.ScrollBar {
} }
,Transition { ,Transition {
to: "show" to: "show"
SequentialAnimation{
PauseAnimation { duration: 100 }
NumberAnimation { NumberAnimation {
target: rect_bar target: rect_bar
properties: vertical ? "width" : "height" properties: vertical ? "width" : "height"
@ -83,7 +81,6 @@ T.ScrollBar {
easing.type: Easing.OutCubic easing.type: Easing.OutCubic
} }
} }
}
] ]
} }
} }