Commit 4c5d7efc authored by Benoît Minisini's avatar Benoît Minisini
Browse files

Code editor: Do not hide automatic completion and signature popup when we are...

Code editor: Do not hide automatic completion and signature popup when we are scrolling horizontally.

[DEVELOPMENT ENVIRONMENT]
* BUG: Code editor: Do not hide automatic completion and signature popup when we are scrolling horizontally.
parent be18f431
Pipeline #231869926 passed with stage
in 20 minutes and 51 seconds
......@@ -32,7 +32,7 @@ Component=gb.signal
Description="Integrated Development Environment for Gambas"
Authors="Benoît Minisini\nFabien Bodard\nCharlie Reinl\nJosé Luis Redrejo\nRobert Rowe\nTobias Boege"
Arguments=[["-L"],["-t","/home/benoit/gambas/git/master/app/src/gambas3"],["--help"]]
Environment="GB_GUI=gb.gtk3\n GTK_DEBUG=interactive"
Environment="GB_GUI=gb.qt5\n GTK_DEBUG=interactive"
TabSize=2
Translate=1
Language=en
......
......@@ -127,3 +127,9 @@ Public Sub GetWord(sLine As String, iPos As Integer) As String
Catch
End
Public Sub Position()
FCompletion.Position(GetEditor())
End
......@@ -68,15 +68,63 @@ Private Function GetClass() As String
End
Public Sub Open(hForm As Object, sMode As String, Optional sClass As String, Optional bStatic As Boolean, Optional bHidden As Boolean)
Public Sub Position(hEditor As TextEditor)
Dim hPos As Point
Dim iX As Integer
Dim iY As Integer
Dim iPos As Integer
Dim hCont As Container
If hEditor <> $hEditor Then Return
hPos = $hEditor.ToPos($hEditor.Line, $iCol)
iX = $hEditor.X + hPos.X
iX = Max(0, Min(iX, $hEditor.Window.ClientW - Me.Width))
iY = hPos.Y + $hEditor.LineHeight
If (iY + Me.Height) > ($hEditor.Y + $hEditor.H) Then
iY = $hEditor.Y + $hEditor.ToPosY() - Me.Height
If iY < 0 Then
Me.Height += iY
iY = 0
Endif
panResizeBottom.Hide
panResizeTop.Show
Else
panResizeBottom.Show
panResizeTop.Hide
Endif
iY += $hEditor.Y
hCont = $hEditor.Parent
Do
If hCont Is Form Then Break
iX += hCont.X
iY += hCont.Y
hCont = hCont.Parent
Loop
Dec Application.Busy
If Me.Parent = $hForm And If iX = Me.X And iY = Me.Y And Me.Visible Then Return
Me.Reparent($hForm, iX, iY)
If Not Me.Visible Then
Me.Show
Me.Raise
Endif
End
Public Sub Open(hForm As Object, sMode As String, Optional sClass As String, Optional bStatic As Boolean, Optional bHidden As Boolean)
Dim iPos As Integer
Dim sText As String
Dim W, H As Integer
Dim hPos As Point
If hForm.GetEditor() <> $hEditor Then HideFrom($hEditor)
$bHideLater = False
......@@ -203,43 +251,7 @@ Public Sub Open(hForm As Object, sMode As String, Optional sClass As String, Opt
sText &= Key.Text
Endif
hPos = $hEditor.ToPos($hEditor.Line, $iCol)
iX = $hEditor.X + hPos.X
iX = Max(0, Min(iX, $hEditor.Window.ClientW - Me.Width))
iY = hPos.Y + $hEditor.LineHeight
If (iY + Me.Height) > ($hEditor.Y + $hEditor.H) Then
iY = $hEditor.Y + $hEditor.ToPosY() - Me.Height
If iY < 0 Then
Me.Height += iY
iY = 0
Endif
panResizeBottom.Hide
panResizeTop.Show
Else
panResizeBottom.Show
panResizeTop.Hide
Endif
iY += $hEditor.Y
hCont = $hEditor.Parent
Do
If hCont Is Form Then Break
iX += hCont.X
iY += hCont.Y
hCont = hCont.Parent
Loop
Dec Application.Busy
If Me.Parent = hForm And If iX = Me.X And iY = Me.Y And Me.Visible Then Return
Me.Reparent(hForm, iX, iY)
Me.Show
Me.Raise
Position($hEditor)
$hEditor.SetFocus
......
......@@ -2204,8 +2204,8 @@ End
Public Sub Editors_Scroll()
$hCompletion.Hide
HideSignature
$hCompletion.Position()
FSignature.Position(Me)
HideMessage
End
......
......@@ -95,6 +95,13 @@ Private Sub UpdateSignature(Optional hForm As FEditor)
End
Public Sub Position(hForm As FEditor)
If hForm.GetEditor() <> $hEditor Then Return
UpdateSignature(hForm)
End
Public Sub Open(hForm As FEditor, iCol As Integer, hSymbol As CSymbolInfo, iArg As Integer)
......
......@@ -1307,7 +1307,7 @@ End
Public Sub Editors_Scroll()
$hCompletion.Hide
$hCompletion.Position()
End
......
......@@ -33,16 +33,21 @@
{ VBox1 VBox
MoveScaled(1,1,88,38)
Spacing = True
Indent = True
{ TextLabel1 TextLabel
MoveScaled(0,0,86,5)
MoveScaled(0,2,86,3)
Font = Font["Bold,+1"]
AutoResize = True
Text = ("The following files have been modified. Do you want to save them?")
}
{ Panel1 Panel
MoveScaled(43,7,7,1)
}
{ lvwFile ListView
MoveScaled(3,10,44,21)
Expand = True
Mode = Select.Multiple
ShowCheck = True
}
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment