Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
朱子楚\zhuzi committed Jun 28, 2024
1 parent 7c4cfce commit 0803042
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 19 deletions.
2 changes: 1 addition & 1 deletion example/qml/component/CodeExpander.qml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ FluExpander{
id:content
width:parent.width
text:highlightQmlCode(code)
textFormat: FluMultilineTextBox.RichText
textFormat: FluCopyableText.RichText
padding: 10
topPadding: 10
leftPadding: 10
Expand Down
6 changes: 3 additions & 3 deletions src/Qt5/imports/FluentUI/Controls/FluCopyableText.qml
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ TextEdit {
function popup(){
sourceComponent = menu
}
onLoaded: {
item.open()
}
}
Component{
id:menu
FluTextBoxMenu{
inputItem: control
Component.onCompleted: {
popup()
}
onClosed: {
menu_loader.sourceComponent = undefined
}
Expand Down
6 changes: 3 additions & 3 deletions src/Qt5/imports/FluentUI/Controls/FluMultilineTextBox.qml
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,12 @@ TextArea{
function popup(){
sourceComponent = menu
}
onLoaded: {
item.open()
}
}
Component{
id:menu
Component.onCompleted: {
popup()
}
FluTextBoxMenu{
inputItem: control
onClosed: {
Expand Down
6 changes: 3 additions & 3 deletions src/Qt5/imports/FluentUI/Controls/FluTextBox.qml
Original file line number Diff line number Diff line change
Expand Up @@ -116,14 +116,14 @@ TextField{
function popup(){
sourceComponent = menu
}
onLoaded: {
item.open()
}
}
Component{
id:menu
FluTextBoxMenu{
inputItem: control
Component.onCompleted: {
popup()
}
onClosed: {
menu_loader.sourceComponent = undefined
}
Expand Down
6 changes: 3 additions & 3 deletions src/Qt6/imports/FluentUI/Controls/FluCopyableText.qml
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ TextEdit {
function popup(){
sourceComponent = menu
}
onLoaded: {
item.open()
}
}
Component{
id:menu
FluTextBoxMenu{
inputItem: control
Component.onCompleted: {
popup()
}
onClosed: {
menu_loader.sourceComponent = undefined
}
Expand Down
20 changes: 17 additions & 3 deletions src/Qt6/imports/FluentUI/Controls/FluMultilineTextBox.qml
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,25 @@ TextArea{
if(control.readOnly && control.text === ""){
return
}
menu.popup()
menu_loader.popup()
}
}
FluTextBoxMenu{
FluLoader{
id: menu_loader
function popup(){
sourceComponent = menu
}
}
Component{
id:menu
inputItem: control
Component.onCompleted: {
popup()
}
FluTextBoxMenu{
inputItem: control
onClosed: {
menu_loader.sourceComponent = undefined
}
}
}
}
6 changes: 3 additions & 3 deletions src/Qt6/imports/FluentUI/Controls/FluTextBox.qml
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,14 @@ TextField{
function popup(){
sourceComponent = menu
}
onLoaded: {
item.open()
}
}
Component{
id:menu
FluTextBoxMenu{
inputItem: control
Component.onCompleted: {
popup()
}
onClosed: {
menu_loader.sourceComponent = undefined
}
Expand Down

0 comments on commit 0803042

Please sign in to comment.