Compare commits

...

5 Commits

Author SHA1 Message Date
朱子楚\zhuzi 3b4c327528 update 2023-11-24 22:05:53 +08:00
zhuzichu 412842d844
Merge pull request #336 from Pemvin/main
Update FluTour.qml
2023-11-24 21:19:06 +08:00
Pemvin a7552e2b5c
Update FluTour.qml 2023-11-17 10:06:53 +08:00
Pemvin 637a0f312e
Merge branch 'zhuzichu520:main' into main 2023-11-17 09:16:32 +08:00
Pemvin 5d11064011
Update FluTour.qml
Automatic place tour boxes above or below targets
2023-11-09 17:38:07 +08:00
12 changed files with 28 additions and 8 deletions

View File

@ -43,6 +43,7 @@ FluScrollablePage{
FluTextBox{
id:text_box
placeholderText: "请输入验证码"
Layout.preferredWidth: 240
}
FluButton{
text:"verify"

View File

@ -31,6 +31,7 @@ FluScrollablePage{
FluTextBox{
id:text_box
text:"会磨刀的小猪"
Layout.preferredWidth: 240
}
}

View File

@ -110,6 +110,7 @@ FluScrollablePage{
FluTextBox{
id:text_box
text:"Technical testing 2015-09-01"
Layout.preferredWidth: 240
}
FluFilledButton{
text:"Append"

View File

@ -29,6 +29,7 @@ FluContentPage{
FluTextBox{
id:text_box
text:"会磨刀的小猪"
Layout.preferredWidth: 240
}
}

View File

@ -44,6 +44,7 @@ FluScrollablePage{
FluTextBox{
id:text_box
placeholderText: "请输入验证码"
Layout.preferredWidth: 240
}
FluButton{
text:"verify"

View File

@ -32,6 +32,7 @@ FluScrollablePage{
FluTextBox{
id:text_box
text:""
Layout.preferredWidth: 240
}
}

View File

@ -111,6 +111,7 @@ FluScrollablePage{
FluTextBox{
id:text_box
text:"Technical testing 2015-09-01"
Layout.preferredWidth: 240
}
FluFilledButton{
text:"Append"

View File

@ -30,6 +30,7 @@ FluContentPage{
FluTextBox{
id:text_box
text:"会磨刀的小猪"
Layout.preferredWidth: 240
}
}

View File

@ -976,7 +976,6 @@ Item {
ScrollBar.vertical: FluScrollBar {}
ListView{
id:nav_list
clip: true
displaced: Transition {
NumberAnimation {
properties: "x,y"

View File

@ -120,8 +120,18 @@ Popup{
width: 500
height: 88 + text_desc.height
color: FluTheme.dark ? Qt.rgba(39/255,39/255,39/255,1) : Qt.rgba(251/255,251/255,253/255,1)
property int dir : {
if(y<d.pos.y)
return 1
return 0
}
x: Math.min(Math.max(0,d.pos.x+d.target.width/2-width/2),d.windowWidth-width)
y: d.pos.y+d.target.height+control.targetMargins + 15
y:{
var ty=d.pos.y+d.target.height+control.targetMargins + 15
if((ty+height)>d.windowHeight)
return d.pos.y-height-control.targetMargins - 15
return ty
}
border.width: 0
FluShadow{
radius: 5
@ -194,9 +204,9 @@ Popup{
}
}
FluIcon{
iconSource: FluentIcons.FlickDown
iconSource: layout_panne.dir?FluentIcons.FlickUp:FluentIcons.FlickDown
color: layout_panne.color
x: d.pos.x+d.target.width/2-10
y: d.pos.y+d.target.height
y: d.pos.y+(layout_panne.dir?-height:d.target.height)
}
}

View File

@ -977,7 +977,6 @@ Item {
ScrollBar.vertical: FluScrollBar {}
ListView{
id:nav_list
clip: true
displaced: Transition {
NumberAnimation {
properties: "x,y"

View File

@ -109,8 +109,12 @@ Popup{
width: 500
height: 88 + text_desc.height
color: FluTheme.dark ? Qt.rgba(39/255,39/255,39/255,1) : Qt.rgba(251/255,251/255,253/255,1)
property int dir : (y<d.pos.y)?1:0
x: Math.min(Math.max(0,d.pos.x+d.target.width/2-width/2),d.window?.width-width)
y: d.pos.y+d.target.height+control.targetMargins + 15
y: {
var ty=d.pos.y+d.target.height+control.targetMargins + 15
return ((ty+height)>d.window?.height)?(d.pos.y-height-control.targetMargins - 15):ty
}
border.width: 0
FluShadow{
radius: 5
@ -183,9 +187,9 @@ Popup{
}
}
FluIcon{
iconSource: FluentIcons.FlickDown
iconSource: layout_panne.dir?FluentIcons.FlickUp:FluentIcons.FlickDown
color: layout_panne.color
x: d.pos.x+d.target.width/2-10
y: d.pos.y+d.target.height
y: d.pos.y+(layout_panne.dir?-height:d.target.height)
}
}