From 390b47ad506ebea69ac57618cb951abd628844ae Mon Sep 17 00:00:00 2001 From: gambas Date: Thu, 22 Mar 2018 02:58:46 +0100 Subject: [PATCH] Draw the form editor tooltip on two lines, and do not open the signature popup if we are inside a string. [DEVELOPMENT ENVIRONMENT] * NEW: Form editor: Draw the tooltip on two lines. * NEW: Code editor: Do not open the signature popup if we are inside a string. --- app/src/gambas3/.src/Editor/Code/FEditor.class | 11 +++++------ app/src/gambas3/.src/Editor/Code/FEditor.form | 2 +- app/src/gambas3/.src/Editor/Form/FForm.class | 16 ++++++++++------ 3 files changed, 16 insertions(+), 13 deletions(-) diff --git a/app/src/gambas3/.src/Editor/Code/FEditor.class b/app/src/gambas3/.src/Editor/Code/FEditor.class index b8fd688ec..91892bd04 100644 --- a/app/src/gambas3/.src/Editor/Code/FEditor.class +++ b/app/src/gambas3/.src/Editor/Code/FEditor.class @@ -920,14 +920,13 @@ Public Sub Editors_KeyPress() If DoStructControlCompletion(iLine, sLine, aSymbol) Then Return - Else If Key.Code = Key.Space Then + Else If Key.Code = Key.Space Or If InStr("(),[]", Key.Text) Then - $bCheckSignature = True + sLine = String.Left$(Highlight.Purge($hEditor.Current.Text, False, True), $hEditor.Column) + If Not GetRightString(sLine) Then + $bCheckSignature = True + Endif - Else If InStr("(),[]", Key.Text) Then - - $bCheckSignature = True - Else If Key.Code = Key.Tab Then If Not $hEditor.Selected Or If $hEditor.Line = $hEditor.SelectionLine Then diff --git a/app/src/gambas3/.src/Editor/Code/FEditor.form b/app/src/gambas3/.src/Editor/Code/FEditor.form index 2945a0696..e18ec6dcd 100644 --- a/app/src/gambas3/.src/Editor/Code/FEditor.form +++ b/app/src/gambas3/.src/Editor/Code/FEditor.form @@ -493,7 +493,7 @@ } } { timShowHelp #Timer - #MoveScaled(63,14) + #MoveScaled(62,16) } { timProc #Timer #MoveScaled(61,34) diff --git a/app/src/gambas3/.src/Editor/Form/FForm.class b/app/src/gambas3/.src/Editor/Form/FForm.class index 8e2c2f466..a801d63ce 100644 --- a/app/src/gambas3/.src/Editor/Form/FForm.class +++ b/app/src/gambas3/.src/Editor/Form/FForm.class @@ -1647,7 +1647,7 @@ Public Sub UpdateInfo(hCCtrl As CControl) $cInfo = ["Name": hCCtrl.Name, "Kind": hCCtrl.Kind, "X": hCCtrl.X, "Y": hCCtrl.Y, "Width": hCCtrl.Width, "Height": hCCtrl.Height] - dwgInfo.Resize(dwgInfo.Font.TextWidth("99999") * 4 + Desktop.Scale * 4, dwgInfo.Font.Height * 3 + Desktop.Scale * 2) + dwgInfo.Resize(dwgInfo.Font.TextWidth("99999") * 4 + Desktop.Scale * 8, dwgInfo.Font.Height * 2 + Desktop.Scale * 2) dwgInfo.Tag = sText MoveInfo @@ -4322,21 +4322,25 @@ Public Sub dwgInfo_Draw() iCol = Color.SetAlpha(Color.TooltipBackground, 128) - H = Paint.Font.Height * 2 + DS + H = Paint.Font.Height + DS Paint.FillRect(0, 0, Paint.W, H, iCol) Paint.FillRect(0, H + 1, Paint.W, Paint.H - H - 1, iCol) Paint.ClipRect = Rect(DS, DS \ 2, Paint.W - DS * 2, Paint.H - DS) + X = DS Y = DS \ 2 + W = (Paint.W - DS * 2) / 2 - DS Paint.Font.Bold = True - Paint.DrawText($cInfo!Name, DS, Y, Paint.W - DS * 2, Paint.Font.Height, Align.Center) + Paint.DrawText($cInfo!Name, X, Y, W, Paint.Font.Height, Align.Right) + X += W Paint.Font.Bold = False - Y += Paint.Font.Height - Paint.DrawText($cInfo!Kind, DS, Y, Paint.W - DS * 2, Paint.Font.Height, Align.Center) + Paint.DrawText($cInfo!Kind, X + DS, Y, W, Paint.Font.Height, Align.Left) + 'Y += Paint.Font.Height + ' Paint.DrawText($cInfo!Kind, DS, Y, Paint.W - DS * 2, Paint.Font.Height, Align.Center) X = DS - Y = DS + Paint.Font.Height * 2 + Y = DS + Paint.Font.Height W = (Paint.W - DS * 2) / 4 H = Paint.H - Y