Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • xmonader/gambas
  • gambas/gambas
  • gbWilly/gambas
  • dtardon/gambas
  • Davidmue/gambas
  • mmu_man/gambas
  • jguardon/gambas
  • tstueker/gambas
  • timsoft/gambas
  • yann64/gambas
  • Matthew-Collins/gambas
  • microhobby/gambas
  • ercoupeflyer/gambas
  • pebauer68/gambas
  • ptmarstech/gambas
  • christhal/gambas
  • tboege/gambas
  • christopherwoo/gambas
  • yusronarif/gambas
  • gen.braga/gambas
  • MelvinG24/gambas
  • Krischel/gambas
  • liang-wei/gambas
  • brucebruen/gambas
  • LibreDWG/gambas
  • SkyN9ne/gambas
  • zxMarce/gambas
  • lordheavy/gambas
  • ddabrahams76/gambas
  • GianluigiOr/gambas
  • rfc1394/gambas
  • wekan/gambas
  • bsteers4/gambas
  • fweimer-rh/gambas
  • CDCDCDCDCDCD/gambas
  • geekdu42/gambas
  • belmotek/gambas
  • jfrank1500/gambas
  • mfischerq/gambas
  • shiny0110/gambas
  • kk667788/gambas
  • bandali/gambas
  • 64sys/gambas
  • justlostintime/gambas
  • aleasto/gambas
  • bgermann/gambas
  • linusky/gambas
47 results
Show changes
Commits on Source (8)
  • Benoît Minisini's avatar
    Remove 'COLOR_DEFAULT' constant. 'GB_COLOR_DEFAULT' must be used instead. · e9572f04
    Benoît Minisini authored
    [GB.IMAGE]
    * BUG: Remove now useless code.
    * NEW: Remove 'COLOR_DEFAULT' constant. 'GB_COLOR_DEFAULT' must be used instead.
    e9572f04
  • Benoît Minisini's avatar
    Adapt to system colors and system theme change at runtime. · 7fd54925
    Benoît Minisini authored
    [GB.GTK]
    * NEW: 'Application_Change' is a new global event handler that is called when system theme, display animation flags or display shadows flag has changed.
    * NEW: 'Application.Change' is a new property that returns which change called 'Application_Change'.
    * NEW: 'Color.Change()' is a new method that replace an old color by the new one during a system colors change.
    * NEW: Replace 'COLOR_DEFAULT' constant by 'GB_COLOR_DEFAULT' constant.
    * BUG: Fix how control borders are handled internally.
    
    [GB.GTK3]
    * NEW: Adapt to system colors and system theme change at runtime.
    * NEW: 'Application_Change' is a new global event handler that is called when system colors, system theme, display animation flags or display shadows flag has changed.
    * NEW: 'Application.Change' is a new property that returns which change called 'Application_Change'.
    * NEW: 'Color.Change()' is a new method that replace an old color by the new one during a system colors change.
    * NEW: Replace 'COLOR_DEFAULT' constant by 'GB_COLOR_DEFAULT' constant.
    * BUG: Fix how control borders are handled internally.
    
    [GB.QT4]
    * NEW: 'Application_Change' is a new global event handler that is called when system theme, display animation flags or display shadows flag has changed.
    * NEW: 'Application.Change' is a new property that returns which change called 'Application_Change'.
    * NEW: 'Color.Change()' is a new method that replace an old color by the new one during a system colors change.
    * NEW: Replace 'COLOR_DEFAULT' constant by 'GB_COLOR_DEFAULT' constant.
    
    [GB.QT5]
    * NEW: Adapt to system colors and system theme change at runtime.
    * NEW: 'Application_Change' is a new global event handler that is called when system colors, system theme, display animation flags or display shadows flag has changed.
    * NEW: 'Application.Change' is a new property that returns which change called 'Application_Change'.
    * NEW: 'Color.Change()' is a new method that replace an old color by the new one during a system colors change.
    * NEW: Replace 'COLOR_DEFAULT' constant by 'GB_COLOR_DEFAULT' constant.
    
    [GB.QT6]
    * NEW: Adapt to system colors and system theme change at runtime.
    * NEW: 'Application_Change' is a new global event handler that is called when system colors, system theme, display animation flags or display shadows flag has changed.
    * NEW: 'Application.Change' is a new property that returns which change called 'Application_Change'.
    * NEW: 'Color.Change()' is a new method that replace an old color by the new one during a system colors change.
    * NEW: Replace 'COLOR_DEFAULT' constant by 'GB_COLOR_DEFAULT' constant.
    7fd54925
  • Benoît Minisini's avatar
    ScrollArea: Adapt to system color changes at runtime. · 7018fab7
    Benoît Minisini authored
    [GB.GUI.BASE]
    * NEW: ScrollArea: Adapt to system color changes at runtime.
    * NEW: ScrollArea: Propagate the 'Change' event of the internal DrawingArea.
    * BUG: ScrollView: Fix the control similar list constant.
    7018fab7
  • Benoît Minisini's avatar
    Remove 'Selection' from the list of standard colors. · f39067de
    Benoît Minisini authored
    [GB.HIGHLIGHT]
    * NEW: Remove 'Selection' from the list of standard colors.
    * NEW: Only the 'Background' and 'Highlight' color names are now background colors.
    f39067de
  • Benoît Minisini's avatar
    TextEditor: Selected text is now drawn using the 'LightBackground' system color. · bea08c36
    Benoît Minisini authored
    [GB.FORM.EDITOR]
    * NEW: TextEditor: Selected text is now drawn using the 'LightBackground' system color.
    * BUG: TextEditor: Draw current line frame on top of the margin contents.
    bea08c36
  • Benoît Minisini's avatar
    Toolbar: Update to system colors change at runtime. · a3db639f
    Benoît Minisini authored
    [GB.FORM.MDI]
    * NEW: Toolbar: Update to system colors change at runtime.
    a3db639f
  • Benoît Minisini's avatar
    HtmlView: Adapt to system colors change at runtime. · 1e683cbf
    Benoît Minisini authored
    [GB.FORM.HTMLVIEW]
    * NEW: HtmlView: Adapt to system colors change at runtime.
    1e683cbf
  • Benoît Minisini's avatar
    Adapt to system colors change at runtime. New look for the editor procedure list. · f5ed3081
    Benoît Minisini authored
    [DEVELOPMENT ENVIRONMENT]
    * NEW: Automatic completion: symbol icons are not lost anymore when the Picture cache is cleared.
    * NEW: Code editor: New look for the procedure list.
    * NEW: Adapt to system colors change at runtime.
    * NEW: Version control workspace: Ensure that the current line is visible when clicking on the terminal tab.
    * BUG: Correctly disable the project tree popup menu when it loses the focus.
    * BUG: Fix a typo when calling 'Message.Warning()' in the Gambas 2 to Gambas 3 conversion code.
    * NEW: Remove the 'Selection' color from highlighting themes.
    f5ed3081
Showing
with 6839 additions and 7065 deletions
This diff is collapsed.
......@@ -4,6 +4,7 @@ Static Public SpecialMethods As String[] = ["_attach", "_call", "_compare", "_ge
Static Private $cTypeName As New Collection
Static Private $cNameType As New Collection(gb.IgnoreCase)
Static Public Icon As New Collection
Public Documentation As CDocumentation
Public Name As String
......@@ -57,7 +58,7 @@ Static Public Sub _init()
hImage = Image.Load("img/symbol" &/ sIcon)
If Application.DarkTheme Then hImage.Invert(True)
hImage = hImage.Stretch(iSize, iSize)
Picture["$symbol:" & File.BaseName(sIcon)] = hImage.Picture
Icon[File.BaseName(sIcon)] = hImage.Picture
Next
End
......@@ -148,7 +149,7 @@ Private Sub _IsFunction() As Boolean
End
Public Function GetIcon() As String
Public Function GetIcon() As Picture
Dim bStatic As Boolean
Dim sIcon As String
......@@ -182,7 +183,7 @@ Public Function GetIcon() As String
End Select
Return "$symbol:" & sIcon
Return Icon[sIcon]
End
......
......@@ -908,15 +908,15 @@ Private Sub FillDBusExplorer(Optional sPath As String, sParent As String, sInter
Select Case Left(sSym)
Case "n"
hPict = Picture["$symbol:symbol"]
hPict = CSymbolInfo.Icon["symbol"]
Case "i"
hPict = Picture["$symbol:special"]
hPict = CSymbolInfo.Icon["special"]
Case "p"
hPict = Picture["$symbol:property"]
hPict = CSymbolInfo.Icon["property"]
Case "m"
hPict = Picture["$symbol:method"]
hPict = CSymbolInfo.Icon["method"]
Case "s"
hPict = Picture["$symbol:event"]
hPict = CSymbolInfo.Icon["event"]
End Select
With tvwDbusExplorer.Add(sKey, "", hPict, sParent)
......
......@@ -648,7 +648,7 @@ Public Sub DefineVariable(sLocal As String, sObject As String)
If Right(sVar) = ":" Then
sVar = Left(sVar)
bBold = sVar = UCase(sVar)
hPict = Picture["$symbol:" & If(sVar == "S", "s-", "") & "variable.png"]
hPict = CSymbolInfo.Icon[If(sVar == "S", "s-", "") & "variable"]
Else
sVar = Mid$(sVar, 3)
aObject[I] = sVar
......
......@@ -69,7 +69,7 @@ Private Sub LoadTests()
sMethod = Mid$(sName, iPos + 1)
If Not tvwSuite.Exist(sClass) Then tvwSuite.Add(sClass, sClass, Picture["icon:/small/directory"])
tvwSuite.Add(sName, sMethod, Picture["$symbol:s-method"], sClass)
tvwSuite.Add(sName, sMethod, CSymbolInfo.Icon["s-method"], sClass)
Next
......
......@@ -405,11 +405,11 @@ Private Sub AddClassesAndFill(aClass As String[], Optional sBegin As String)
hPic[0] = Picture["img/logo/head-16.png"]
hPic[1] = $hClassPicture
hPic[2] = Picture["$symbol:control"]
hPic[3] = Picture["$symbol:symbol"]
hPic[4] = Picture["$symbol:event"]
hPic[2] = CSymbolInfo.Icon["control"]
hPic[3] = CSymbolInfo.Icon["symbol"]
hPic[4] = CSymbolInfo.Icon["event"]
hPic[5] = hPic[0]
hPic[6] = Picture["$symbol:special"]
hPic[6] = CSymbolInfo.Icon["special"]
ClearRows
......@@ -513,7 +513,7 @@ Private Sub FillWithSymbol(sClass As String, bStatic As Boolean, bPrivate As Boo
For Each sSymbol In aSymbol
hSymbol = cSymbol[sSymbol]
AddRow(CStr(MHelp.TYPE_SYMBOL) & sSymbol, sSymbol, Picture[hSymbol.GetIcon()], IsUCase(hSymbol.Kind))
AddRow(CStr(MHelp.TYPE_SYMBOL) & sSymbol, sSymbol, hSymbol.GetIcon(), IsUCase(hSymbol.Kind))
$iMaxLen = Max($iMaxLen, String.Len(sSymbol))
Next
......@@ -742,7 +742,7 @@ End
Private Sub FillWithSpecial()
Dim sName As String
Dim hPict As Picture = Picture["$symbol:special"]
Dim hPict As Picture = CSymbolInfo.Icon["special"]
ClearRows
......@@ -1026,7 +1026,7 @@ Private Function InsertItem(Optional bNoSpace As Boolean, sMore As String) As Bo
Try sText = gvwComp.Current.Text
If Not sText Then Return True
If gvwComp[gvwComp.Row, 0].Picture = Picture["$symbol:event"] Then
If gvwComp[gvwComp.Row, 0].Picture = CSymbolInfo.Icon["event"] Then
If $hForm Is FEditor And If $hForm.IsProc($hEditor[$hEditor.Line].Text) Then
hClass = Project.Documentation.Classes[$sEventClass]
If hClass Then ' FIXME: Why hClass can be null?
......
......@@ -2803,16 +2803,7 @@ Private Sub FillProc()
Dim hSymbol As CSymbolInfo
Dim cSymbol As Collection
Dim sText As String
Dim sName As String
Dim aSymbol As New String[][16]
' Dim aPrivate As String[]
' Dim aStaticPrivate As String[]
' Dim aStaticPublic As String[]
' Dim aPublic As String[]
Dim bSeparateStatic As Boolean
Dim I As Integer
Dim iType As Integer
Dim sTitle As String
'DIM fTime AS Float
'DIM iInd AS Integer
......@@ -2833,6 +2824,7 @@ Private Sub FillProc()
$cProc = New Collection(gb.IgnoreCase)
$aProc = New String[]
$iFirstProcLine = 1000000
'{Scan} = Null
......@@ -2845,120 +2837,29 @@ Private Sub FillProc()
If Not cSymbol Then cSymbol = New Collection
' aStaticPrivate = New String[]
' aPrivate = New String[]
' aStaticPublic = New String[]
' aPublic = New String[]
For I = 0 To 15
aSymbol[I] = New String[]
Next
For Each hSymbol In cSymbol
If LCase(hSymbol.Kind) <> "m" Then Continue
If hSymbol.LineNumber = 0 Then Continue
If hSymbol.Class <> Me.Name Then Continue
sName = hSymbol.Name
iType = 0
If hSymbol.IsStatic And If bSeparateStatic Then
Else
iType = BSet(iType, PROC_DYNAMIC)
Endif
If hSymbol.NotPublic Then iType = BSet(iType, PROC_PRIVATE)
If Left(sName) = "_" Then
If Not hSymbol.NotPublic Then iType = BSet(iType, PROC_HIDDEN)
Else If InStr(sName, "_") Then
iType = BSet(iType, PROC_EVENT)
Endif
aSymbol[iType].Add(sName)
' sKind = If(hSymbol.NotPublic, "p", "m")
' If hSymbol.IsStatic Then sKind = UCase(sKind)
' If bSeparateStatic And If hSymbol.IsStatic Then
' If hSymbol.NotPublic Then
' aStaticPrivate.Add(sName)
' Else
' aStaticPublic.Add(sName)
' Endif
' Else
' If hSymbol.NotPublic Then
' aPrivate.Add(sName)
' Else
' aPublic.Add(sName)
' Endif
' Endif
$aProc.Add(hSymbol.Name)
Next
For I = 0 To 15
aSymbol[I].Sort(gb.IgnoreCase)
Next
' aStaticPrivate.Sort(gb.IgnoreCase)
' aPrivate.Sort(gb.IgnoreCase)
' aStaticPublic.Sort(gb.IgnoreCase)
' aPublic.Sort(gb.IgnoreCase)
For I = 0 To 15
If aSymbol[I].Count = 0 Then Continue
sTitle = ""
If Not BTst(I, PROC_DYNAMIC) Then sTitle &= " STATIC"
If BTst(I, PROC_EVENT) Then
If BTst(I, PROC_PRIVATE) Then
sTitle &= " PROPERTY"
Else
sTitle &= " EVENT"
Endif
Else If BTst(I, PROC_HIDDEN) And If Not BTst(I, PROC_PRIVATE) Then
sTitle &= " HIDDEN"
Else
If BTst(I, PROC_PRIVATE) Then
sTitle &= " PRIVATE"
Else
sTitle &= " PUBLIC"
Endif
Endif
$aProc.Add("-" & LTrim(sTitle))
$aProc.Insert(aSymbol[I])
Next
' If aStaticPublic.Count Then
' $aProc.Add("-STATIC PUBLIC")
' $aProc.Insert(aStaticPublic)
' Endif
' If aPublic.Count Then
' $aProc.Add("-PUBLIC")
' $aProc.Insert(aPublic)
' Endif
' If aStaticPrivate.Count Then
' $aProc.Add("-STATIC PRIVATE")
' $aProc.Insert(aStaticPrivate)
' Endif
' If aPrivate.Count Then
' $aProc.Add("-PRIVATE")
' $aProc.Insert(aPrivate)
' Endif
For Each sName In $aProc
If sName Begins "-" Then Continue
hSymbol = cSymbol[sName]
'cmbProc.Add(sName)
$cProc[hSymbol.Name] = hSymbol.LineNumber - 1
$iFirstProcLine = Min($iFirstProcLine, hSymbol.LineNumber - 1)
Next
$aProc.Sort(gb.IgnoreCase + gb.Natural)
$aProc.Add(("(Declarations)"), 0)
$cProc[$aProc[0]] = 0
SetComboProcText(sText)
'NEXT
'DEBUG Timer - fTime
Dec Application.Busy
End
......
......@@ -38,6 +38,8 @@ Public Sub Init(hModule As FEditor, sClass As String, aProc As String[], iCurren
btnShowStatic.Visible = Not $bStatic
Endif
If $sClass Then Project.Documentation.GetClassSymbols($sClass)
FilterProc
Me.Resize(W, Min(H, $aProc.Count * gvwProc.Rows.H + panFilter.H + 3))
......@@ -173,30 +175,34 @@ Public Sub gvwProc_Draw(X As Integer, Y As Integer, Width As Integer, Height As
Dim hSymbol As CSymbolInfo
Dim sName As String
Dim WT As Float
Dim hPict As Picture
Dim D As Integer
Try sName = $aProc[$aFilter[Row]]
If Not sName Then Return
If sName Begins "-" Then
sName = Mid$(sName, 2)
Paint.Font.Grade = -2
WT = Paint.TextSize(sName).Width + Desktop.Scale
Paint.FillRect(X - 2, Y + Height \ 2, Width + 4, 1, Color.Merge(Color.LightForeground, Color.TextBackground))
Paint.FillRect(X + (Width - WT) / 2, Y, WT, Height, Color.TextBackground)
Paint.Background = Color.LightForeground
Paint.DrawText(sName, X, Y, Width, Height, Align.Center)
Return
Endif
' If sName Begins "-" Then
'
' sName = Mid$(sName, 2)
'
' Paint.Font.Grade = -2
' WT = Paint.TextSize(sName).Width + Desktop.Scale
'
' Paint.FillRect(X - 2, Y + Height \ 2, Width + 4, 1, Color.Merge(Color.LightForeground, Color.TextBackground))
' Paint.FillRect(X + (Width - WT) / 2, Y, WT, Height, Color.TextBackground)
'
' Paint.Background = Color.LightForeground
' Paint.DrawText(sName, X, Y, Width, Height, Align.Center)
'
' Return
'
' Endif
If Row = $iCurrent Then Paint.FillRect(X, Y, Width, Height, Color.SetAlpha(Color.LightBackground, 192))
If $aFilter[Row] = $iInit Then Paint.FillRect(X, Y, Width, Height, Color.SetAlpha(Color.LightBackground, 128))
If Row = $iCurrent Then
Paint.FillRect(X, Y, Width, 1, Color.LightForeground)
Paint.FillRect(X, Y + Height - 1, Width, 1, Color.LightForeground)
Endif
Paint.Background = Color.TextForeground
Paint.Font.Bold = False
......@@ -206,21 +212,37 @@ Public Sub gvwProc_Draw(X As Integer, Y As Integer, Width As Integer, Height As
Project.Documentation.GetClassSymbols($sClass)
Try hSymbol = $hModule.Scan[sName]
If hSymbol And If hSymbol.Kind = "M" Then Paint.Font.Bold = True
Endif
If Left(sName) = "_" Then
If CSymbolInfo.SpecialMethods.Exist(sName, gb.IgnoreCase) Then
Paint.Background = Color.Blend(Color.SetAlpha(Color.TextForeground, 128), Color.SelectedBackground)
If hSymbol Then
If hSymbol.IsStatic Then Paint.Font.Bold = True
If hSymbol.NotPublic Then Paint.Background = Color.SetAlpha(Paint.Background, 96)
If InStr(sName, "_") > 1 Then
If hSymbol.NotPublic Then
If sName Ends "_Read" Then
hPict = CSymbolInfo.Icon[If(hSymbol.IsStatic, "s-property-ro", "property-ro")]
Else If sName Ends "_Write" Then
hPict = CSymbolInfo.Icon[If(hSymbol.IsStatic, "s-property-rw", "property-rw")]
Else
hPict = hSymbol.GetIcon()
Endif
Else
hPict = CSymbolInfo.Icon[If(hSymbol.IsStatic, "s-event", "event")]
Paint.Font.Italic = True
Endif
Else
hPict = hSymbol.GetIcon()
Endif
D = Desktop.Scale \ 4 + 1
Paint.DrawPicture(hPict, X + D, Y + (Height - hPict.H) / 2, hPict.W, hPict.H)
X += hPict.W + D
Endif
Else If InStr(sName, "_") Then
'gvwProc.Data.Picture = Picture["img/16/event.png"]
Paint.Font.Italic = True
Endif
If hSymbol And If hSymbol.NotPublic Then Paint.Background = Color.Merge(Paint.Background, Color.TextBackground, 0.3)
If $sClass = Project.Startup And If sName = "Main" Then
Paint.Font.Underline = True
Endif
......@@ -232,7 +254,6 @@ End
Private Sub FilterProc()
Dim sProc As String
Dim bShowStatic As Boolean
Dim bShowPublic As Boolean
Dim bShowPrivate As Boolean
......@@ -243,6 +264,8 @@ Private Sub FilterProc()
Dim bShowHidden As Boolean
Dim sLastGroup As String
Dim iCurrent As Integer
Dim sName As String
Dim hSymbol As CSymbolInfo
If $bNoFilter Then Return
......@@ -272,39 +295,24 @@ Private Sub FilterProc()
For I = 0 To $aProc.Max
sProc = $aProc[I]
If sProc Begins "-" Then
sGroup = Mid$(sProc, 2)
Continue
Endif
If Not sGroup Then
$aFilter.Add(I)
Continue
Endif
If bShowPublic And If InStr(sGroup, "PUBLIC") = 0 Then
Continue
Else If bShowPrivate And If InStr(sGroup, "PRIVATE") = 0 Then
Continue
Else If bShowEvent And If InStr(sGroup, "EVENT") = 0 Then
Continue
Else If bShowProperty And If InStr(sGroup, "PROPERTY") = 0 Then
Continue
Else If bShowHidden And If InStr(sGroup, "HIDDEN") = 0 Then
Continue
Endif
If bShowStatic Then
If InStr(sGroup, "STATIC") = 0 Then Continue
Else
If InStr(sGroup, "STATIC") Then Continue
Endif
sName = $aProc[I]
Try hSymbol = $hModule.Scan[sName]
If hSymbol Then
If sGroup <> sLastGroup Then
$aFilter.Add(I - 1)
sLastGroup = sGroup
If bShowPublic And If hSymbol.NotPublic Then Continue
If bShowPrivate And If Not hSymbol.NotPublic Then Continue
If bShowEvent Then
If hSymbol.NotPublic Then Continue
If InStr(sName, "_") <= 1 Then Continue
Endif
If bShowProperty Then
If Not hSymbol.NotPublic Then Continue
If sName Not Ends "_Read" And If sName Not Ends "_Write" Then Continue
Endif
If bShowHidden And If sName Not Begins "_" Then Continue
If bShowStatic Xor hSymbol.IsStatic Then Continue
Endif
$aFilter.Add(I)
......
......@@ -75,7 +75,7 @@
MoveScaled(9,5,20,0)
}
{ gvwProc GridView
MoveScaled(3,14,25,22)
MoveScaled(4,11,35,22)
Tracking = True
Mouse = Cursor.Pointing
Expand = True
......
......@@ -105,11 +105,11 @@ Static Public Sub GetIcon(sClass As String, sComp As String, Optional iSize As I
W = Paint.Font.TextWidth(sClass)
Paint.End
hImage = New Image(Max(DS * 8, W + DS * 2), DS * 8, Color.White)
hImage = New Image(Max(DS * 8, W + DS * 2), DS * 8, Color.Transparent)
Paint.Begin(hImage)
Paint.DrawRect(0, 0, hImage.W, hImage.H, Color.Gray, 2)
Paint.DrawRect(0, 0, hImage.W, hImage.H, Color.LightForeground, 2)
' Paint.Rectangle(0.5, F + 0.5, hImage.W - 1, hImage.H - F * 2 - 1)
' Paint.Background = Color.Gray
......@@ -120,7 +120,7 @@ Static Public Sub GetIcon(sClass As String, sComp As String, Optional iSize As I
Paint.Clip
Paint.Font.Size = DS * 2
Paint.Background = Color.Black
Paint.Background = Color.TextForeground
Paint.DrawText(sClass, DS, 0, hImage.W - DS * 2, hImage.H, Align.Left)
Paint.End
......@@ -137,7 +137,7 @@ Static Public Sub GetIcon(sClass As String, sComp As String, Optional iSize As I
If hImage.Width <> iSize Then hImage = hImage.Stretch(iSize, iSize)
Endif
If Application.DarkTheme Then hImage = hImage.Invert(True)
'If Application.DarkTheme Then hImage = hImage.Invert(True)
Return hImage.Picture
......
......@@ -22,10 +22,6 @@ Private $bIgnoreHide As Boolean
Private $bIgnoreCancel As Boolean
Private $bSort As Boolean
Private $iBgDefault As Integer
Private $iBgSet As Integer
Private $iBgModified As Integer
Static Private $aFieldUseDelete As String[] = ["Font", "Picture", "String[]", "Path", "Color", "Field", "Fields", "Field[]", "Image", "Animation", "WebImage", "SvgImage", "ReportCoord", "ReportPadding", "ReportMargin", "ReportBorder", "ReportBoxShadow", "ReportBrush", "Table", "WebCoord", "WebFont"]
Private Const PADDING As Integer = 6
......@@ -39,10 +35,6 @@ Public Sub _new()
grdProperty.ScrollBar = Scroll.Vertical
grdProperty.Columns.Resizable = True
$iBgDefault = Color.TextBackground
$iBgSet = Color.Merge(Color.TextBackground, Color.LightForeground, 0.25)
$iBgModified = Color.Merge(Color.TextBackground, Color.LightBackground, 0.25)
End
Public Sub Form_Open()
......@@ -82,6 +74,24 @@ Public Sub Form_Resize()
End
Private Sub GetDefaultBackground() As Integer
Return Color.TextBackground
End
Private Sub GetSetBackground() As Integer
Return Color.Merge(Color.TextBackground, Color.LightForeground, 0.25)
End
Private Sub GetModifiedBackground() As Integer
Return Color.Merge(Color.TextBackground, Color.LightBackground, 0.25)
End
Public Sub RefreshAll()
Dim cSelection As Collection
......@@ -222,10 +232,10 @@ Public Sub RefreshAll()
grdProperty[iRow, 1].Alignment = Align.TopNormal
If CControl.WasDefaultValue Then
iBg = $iBgDefault
iBg = GetDefaultBackground()
grdProperty[iRow, 0].Font.Bold = False
Else
iBg = $iBgSet
iBg = GetSetBackground()
grdProperty[iRow, 0].Font.Bold = True
Endif
......@@ -321,10 +331,10 @@ Public Sub RefreshOne(hCtrl As CControl, sProp As String)
grdProperty[iRow, 1].Text = sVal
If sVal = $cInitialValue[sProp] Then
iBg = If(CControl.WasDefaultValue, $iBgDefault, $iBgSet)
iBg = If(CControl.WasDefaultValue, GetDefaultBackground(), GetSetBackground())
'grdProperty[iRow, 0].Font.Bold = True
Else
iBg = $iBgModified
iBg = GetModifiedBackground()
'grdProperty[iRow, 0].Font.Bold = True
Endif
grdProperty[iRow, 0].Font.Bold = Not CControl.WasDefaultValue
......
......@@ -46,19 +46,16 @@
}
{ Panel1 Panel
MoveScaled(2,8,56,36)
Background = Color.TextBackground
Expand = True
Arrangement = Arrange.Fill
{ grdProperty GridView
MoveScaled(28,2,25,31)
Visible = False
Background = Color.TextBackground
Border = False
}
{ panEditor HBox
MoveScaled(2,3,25,31)
Visible = False
Background = Color.TextBackground
Ignore = True
{ spnProperty SpinBox
MoveScaled(2,5,14,3)
......
......@@ -59,6 +59,15 @@ Private Function AddToolBar(sToolBar As String, sType As String) As FToolPanel
End
Public Sub UpdateColor()
Dim hToolbar As FToolPanel
For Each hToolbar In $cToolBar
hToolbar.UpdateColor()
Next
End
Public Sub RefreshToolbar(Optional bForce As Boolean)
......
......@@ -28,11 +28,24 @@ Public Sub _new(sName As String, sType As String)
End
Private Sub GetIcon(sControl As String, sComp As String) As Picture
Dim hPict As Picture
hPict = CControl.GetIcon(sControl, sComp)
If hPict Then
If hPict.Height <> $iSize Then hPict = hPict.Image.Stretch(-1, $iSize).Picture
Picture[".control" &/ LCase(sControl)] = hPict
Endif
Return hPict
End
Public Sub Add(sControl As String, Optional sComp As String, Optional sType As String)
Dim hCtrl As ToolButton
Dim hPict As Picture
Dim W, H As Integer
Dim hPict As Picture
If Not sType Then sType = "*"
......@@ -46,11 +59,9 @@ Public Sub Add(sControl As String, Optional sComp As String, Optional sType As S
If sControl <> SELECT_TOOL Then hCtrl.ToolTip = sControl
hCtrl.Design = True
hPict = CControl.GetIcon(sControl, sComp)
hPict = GetIcon(sControl, sComp)
If hPict Then
If hPict.W > hPict.H Then W = ($iSize * hPict.W) \ hPict.H + 8
Picture[".control" &/ LCase(sControl)] = hPict
If hPict.Height <> $iSize Then hPict = hPict.Image.Stretch(-1, $iSize).Picture
hCtrl.Picture = hPict
Endif
......@@ -59,6 +70,18 @@ Public Sub Add(sControl As String, Optional sComp As String, Optional sType As S
End
Public Sub UpdateColor()
Dim hCtrl As ToolButton
Dim aInfo As String[]
For Each hCtrl In $cButton
aInfo = hCtrl.Tag
hCtrl.Picture = GetIcon(aInfo[0], aInfo[2])
Next
End
Public Sub Exist(sControl As String) As Boolean
Return $cButton.Exist(sControl)
......
......@@ -172,6 +172,7 @@ Public Sub tabVersion_Click()
$bInitTerminal = True
Endif
trmVersionControl.EnsureVisible
trmVersionControl.SetFocus
End Select
......
......@@ -3244,8 +3244,10 @@ Private Sub UpdateVersionControl()
If $iCurrentWorkspace = WORKSPACE_VERSION Then CloseCurrentWorkspace
Endif
sBranch = VersionControl.GetCurrentBranch()
VersionControl.InitBranchLabel(lblBranchColor, sBranch)
If VersionControl.Enabled Then
sBranch = VersionControl.GetCurrentBranch()
VersionControl.InitBranchLabel(lblBranchColor, sBranch)
Endif
End
......@@ -3839,3 +3841,9 @@ Public Sub OnProjectTimestamp()
End Select
End
Public Sub tvwProject_LostFocus()
Project.SetCurrentPopup(Null)
End
......@@ -53,6 +53,21 @@ Static Public Sub Get(sFamily As String) As CFamily
End
Static Public Sub UpdateColor()
Dim hFamily As CFamily
Dim hFile As Object
For Each hFamily In All
hFamily.Background = Color.Change(hFamily.Background)
Next
For Each hFile In Project.Files
Try hFile.UpdateSnap()
Next
End
Static Public Sub Exit()
All = Null
......
......@@ -280,31 +280,16 @@ End
Private Sub RefreshEditor()
Dim hFile As Object
If $bNoChange Then Return
Settings["/Editor/Font"] = txtEditorFont.Value
Project.InitWebView
RefreshStyle
MTheme.Theme = $hTheme
Project.InitWebView
For Each hFile In Project.Files
Try hFile.ReadConfig()
Next
FSearch.ReadConfig
FMain.ReadConfig
FProperty.ReadConfig
FFormStack.ReadConfig
FOutput.ReadConfig
FDebugInfo.ReadConfig
FDebugExpr.ReadConfig
FCompletion.ReadConfig
FSignature.ReadConfig
Project.UpdateConfig
End
......@@ -320,7 +305,6 @@ Private Sub RefreshConsole()
End
Public Sub btnUndo_Click()
$hTheme = $hLastTheme.Copy()
......@@ -530,8 +514,6 @@ Public Sub cmbIconTheme_Click()
Endif
Project.UpdateTheme
Stock.Refresh
Project.Refresh
'NeedRestart(cmbIcontheme)
End
......
......@@ -24,6 +24,8 @@
Public Const COLOR_ORANGE As Integer = &HDF6B00
Public Const COLOR_BLUE As Integer = &H61A7C3 '&H3398C3
Public ChangeIndex As Integer
Public ProjectTree As TreeView
Public Tree As CProjectTree
Public ProjectFilter As String
......@@ -759,7 +761,7 @@ _INIT_AGAIN:
If bConvert Then
If ReadOnly Then
Message.Warnig(("This project is read-only.") & " " & ("It cannot be converted."))
Message.Warning(("This project is read-only.") & " " & ("It cannot be converted."))
Return True
Endif
......@@ -5556,7 +5558,6 @@ Public Sub GetTranslations() As String[]
End
Public Sub MakeDirectoryIcon(Optional sDir As String) As Boolean
Dim hDirIcon As Image
......@@ -5789,6 +5790,12 @@ End
Public Sub SetCurrentPopup(hMenu As Menu)
' If hMenu Then
' Debug hMenu.Window.Name; "."; hMenu.Name
' Else
' Debug "NULL"
' Endif
If hMenu = $hCurrentPopup Then
If Not hMenu Or If hMenu.Enabled Then Return
Endif
......@@ -5989,7 +5996,6 @@ Public Sub SetConsoleFont(hCtrl As Control)
End
Public Sub UpdateLibraries(aLib As String[]) As Boolean
Dim sPath As String
......@@ -6067,9 +6073,9 @@ Public Sub GetBackground() As Image
sBackground = Settings["/Background/Image", DEFAULT_BACKGROUND]
Try $hBackground = Image.Load("img/background" &/ sBackground & ".png")
If Not $hBackground Then $hBackground = New Image(32, 32, Color.RGB(128, 128, 128, 128))
If Application.DarkTheme Then $hBackground = $hBackground.Invert(True)
iColor = GetBackgroundColor()
$hBackground.Colorize(iColor)
If Application.DarkTheme Then $hBackground = $hBackground.Invert(True)
$bBackgroundValid = True
Endif
......@@ -6141,6 +6147,47 @@ Public Sub Application_Error()
End
Public Sub UpdateConfig()
Dim hFile As Object
For Each hFile In Project.Files
Try hFile.ReadConfig()
Next
FSearch.ReadConfig
FMain.ReadConfig
FProperty.ReadConfig
FFormStack.ReadConfig
FOutput.ReadConfig
FDebugInfo.ReadConfig
FDebugExpr.ReadConfig
FCompletion.ReadConfig
FSignature.ReadConfig
End
Public Sub Application_Change()
If Application.Change <> "color" And If Application.Change <> "theme" Then Return
Inc ChangeIndex
Stock.Refresh
$cImageCache.Clear
ChangeBackground(True)
If Not Application.MainWindow Then Return
UpdateConfig
CFamily.UpdateColor()
FToolBox.UpdateColor()
FMain.OnVersionControlChange()
Project.Refresh(True)
End
Public Sub CanUseHttpServer() As Boolean
If Components Then Return Components.Exist("gb.web")
......
......@@ -11,6 +11,7 @@ Public Const KEY_PROFILE As String = "$F"
Public Sources As Collection
Private $iChangeIndex As Integer
Private $hTree As TreeView
Private $sDir As String
Private $bCurrentProject As Boolean
......@@ -52,7 +53,6 @@ Public Sub RefreshInfo()
End
Public Sub SetView(hTreeView As TreeView)
If $hTree And If $hTree <> hTreeView Then Error.Raise("TreeView already set")
......@@ -403,6 +403,12 @@ Private Sub FillTree(Optional bDoNotRefreshCache As Boolean)
'$bDisplayForm = Settings["/DisplayForm"]
If $iChangeIndex < Project.ChangeIndex Then
$iChangeIndex = Project.ChangeIndex
$cImageCache.Clear
$cImageDate.Clear
Endif
For Each $cExtern
If Not Exist($cExtern.Key) Then $cExtern.Remove($cExtern.Key)
Next
......