This commit is contained in:
zhuzichu
2023-12-28 12:42:22 +08:00
parent 2cfc73c00b
commit 9adb6b645b
10 changed files with 41 additions and 49 deletions

View File

@ -26,6 +26,7 @@ TextEdit {
anchors.fill: parent
cursorShape: Qt.IBeamCursor
acceptedButtons: Qt.RightButton
visible: !readOnly
onClicked: control.echoMode !== TextInput.Password && menu.popup()
}
FluTextBoxMenu{

View File

@ -64,6 +64,7 @@ TextArea{
anchors.fill: parent
cursorShape: Qt.IBeamCursor
acceptedButtons: Qt.RightButton
visible: !readOnly
onClicked: control.echoMode !== TextInput.Password && menu.popup()
}
FluTextBoxMenu{

View File

@ -62,6 +62,7 @@ TextField{
anchors.fill: parent
cursorShape: Qt.IBeamCursor
acceptedButtons: Qt.RightButton
visible: !readOnly
onClicked: control.echoMode !== TextInput.Password && menu.popup()
}
RowLayout{

View File

@ -53,6 +53,7 @@ Window {
signal showSystemMenu
signal initArgument(var argument)
signal firstVisible()
property point _offsetXY : Qt.point(0,0)
id:window
color:"transparent"
Component.onCompleted: {
@ -175,30 +176,12 @@ Window {
}
Item{
id:layout_container
property int offsetX: {
if(window.visibility === Window.Maximized){
var dx = window.x-Screen.virtualX
if(dx<0){
return Math.abs(dx+1)
}
}
return 0
}
property int offsetY: {
if(window.visibility === Window.Maximized){
var dy = window.y-Screen.virtualY
if(dy<0){
return Math.abs(dy+1)
}
}
return 0
}
anchors{
fill:parent
leftMargin: offsetX
rightMargin: offsetX
topMargin: offsetY
bottomMargin: offsetY
leftMargin: _offsetXY.x
rightMargin: _offsetXY.x
topMargin: _offsetXY.y
bottomMargin: _offsetXY.y
}
onWidthChanged: {
window.appBar.width = width