[DEVELOPMENT ENVIRONMENT]
* BUG: Indent & unident buttons now work in text editors. git-svn-id: svn://localhost/gambas/trunk@5178 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
parent
54150a91e0
commit
57764a966b
5 changed files with 30 additions and 7 deletions
|
@ -326,7 +326,7 @@ msgstr ""
|
|||
msgid "Loading information on component &1..."
|
||||
msgstr ""
|
||||
|
||||
#: CInsertColor.class:106 FEditor.form:419 FTextEditor.form:348
|
||||
#: CInsertColor.class:106 FEditor.form:419 FTextEditor.form:350
|
||||
msgid "Insert color"
|
||||
msgstr ""
|
||||
|
||||
|
@ -632,12 +632,12 @@ msgid "Redo"
|
|||
msgstr ""
|
||||
|
||||
#: FCommit.form:121 FConflict.form:83 FEditor.form:453 FMenu.form:129
|
||||
#: FTextEditor.form:325
|
||||
#: FTextEditor.form:326
|
||||
msgid "Indent"
|
||||
msgstr ""
|
||||
|
||||
#: FCommit.form:127 FConflict.form:89 FEditor.form:461 FMenu.form:135
|
||||
#: FTextEditor.form:332
|
||||
#: FTextEditor.form:334
|
||||
msgid "Unindent"
|
||||
msgstr ""
|
||||
|
||||
|
@ -1526,7 +1526,7 @@ msgstr ""
|
|||
msgid "Watch expression"
|
||||
msgstr ""
|
||||
|
||||
#: FEditor.form:555 FTextEditor.form:414
|
||||
#: FEditor.form:555 FTextEditor.form:416
|
||||
msgid "Procedure list"
|
||||
msgstr ""
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ Public Sub Panel_Draw()
|
|||
Endif
|
||||
|
||||
Draw.Picture($hPict, 8, ($hPanel.H - $hPict.H) \ 2)
|
||||
If $bInside Then Draw.Foreground = Color.Gradient($hPanel.Foreground, $iHighlight)
|
||||
'If $bInside Then Draw.Foreground = Color.Gradient($hPanel.Foreground, $iHighlight)
|
||||
Draw.Text($sText, $hPict.W + 16, 0, $hPanel.W - $hPict.W - 24, $hPanel.H, Align.Normal)
|
||||
|
||||
' If $bArrow Then
|
||||
|
@ -61,7 +61,7 @@ Public Sub Panel_Draw()
|
|||
' 'Draw.Style.Arrow(Draw.W - 32, (Draw.H - 32) \ 2, 32, 32, Align.Right)
|
||||
' Endif
|
||||
|
||||
If $hPanel.HasFocus Then
|
||||
If $bInside Then
|
||||
Paint.Begin(Draw.Device)
|
||||
Paint.Rectangle(0, 0, Paint.W, Paint.H)
|
||||
Paint.Brush = Paint.Color(Color.SetAlpha($iHighlight, 192))
|
||||
|
@ -70,6 +70,11 @@ Public Sub Panel_Draw()
|
|||
Paint.End
|
||||
Endif
|
||||
|
||||
If $hPanel.HasFocus Then
|
||||
Draw.Foreground = $iHighlight
|
||||
Draw.Rect(2, 2, Draw.W - 4, Draw.H - 4)
|
||||
Endif
|
||||
|
||||
End
|
||||
|
||||
|
||||
|
|
|
@ -1082,3 +1082,16 @@ Public Sub Form_Open()
|
|||
SetReadOnly
|
||||
|
||||
End
|
||||
|
||||
Public Sub btnIndent_Click()
|
||||
|
||||
Editor.Indent
|
||||
|
||||
End
|
||||
|
||||
Public Sub btnUnindent_Click()
|
||||
|
||||
Editor.Unindent
|
||||
|
||||
End
|
||||
|
||||
|
|
|
@ -218,12 +218,14 @@
|
|||
}
|
||||
{ btnIndent ToolButton
|
||||
MoveScaled(25,0,4,4)
|
||||
Visible = False
|
||||
ToolTip = ("Indent")
|
||||
Action = ".indent"
|
||||
Picture = Picture["icon:/small/indent"]
|
||||
}
|
||||
{ btnUnindent ToolButton
|
||||
MoveScaled(28,0,4,4)
|
||||
Visible = False
|
||||
ToolTip = ("Unindent")
|
||||
Action = ".unindent"
|
||||
Picture = Picture["icon:/small/unindent"]
|
||||
|
@ -453,6 +455,6 @@
|
|||
{ Toolbar text
|
||||
Text = "Text editor"
|
||||
List = "save,reload,cut,show-class,copy,paste,undo,redo,indent,unindent,bookmark,color,compress,uncompress,view-nosplit,view-hsplit,view-vsplit,proc"
|
||||
Default = "save,reload,show-class,undo,redo,indent,unindent,bookmark,color,|,compress,uncompress,|,|,proc,$lblInfo"
|
||||
Default = "save,reload,show-class,undo,redo,bookmark,color,|,compress,uncompress,|,|,proc,$lblInfo"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -103,6 +103,7 @@ End
|
|||
Public Sub btnNew_Click()
|
||||
|
||||
$sPath = FCreateProject.Run()
|
||||
txtFilter.SetFocus
|
||||
If $sPath Then Me.Close
|
||||
|
||||
End
|
||||
|
@ -111,6 +112,7 @@ End
|
|||
Public Sub btnOpen_Click()
|
||||
|
||||
$sPath = FOpenProject.Run()
|
||||
txtFilter.SetFocus
|
||||
If $sPath Then Me.Close
|
||||
|
||||
End
|
||||
|
@ -570,6 +572,7 @@ End
|
|||
Public Sub btnAbout_Click()
|
||||
|
||||
FAbout.Run
|
||||
txtFilter.SetFocus
|
||||
|
||||
End
|
||||
|
||||
|
|
Loading…
Reference in a new issue