[DEVELOPMENT ENVIRONMENT]
* NEW: New way of making source file icons. [GB.DB.*] * BUG: Forgot to add *.component files. git-svn-id: svn://localhost/gambas/trunk@1927 867c0c6c-44f3-4631-809d-bfa615b0a4ec
|
@ -539,23 +539,36 @@ Private Sub AddLinkEmblem(hPict As Picture) As Picture
|
|||
|
||||
End
|
||||
|
||||
Private Sub MakeModuleIcon(sModule As String, Optional iSize As Integer = 16) As Picture
|
||||
Private Sub MakeModuleIcon(sModule As String, Optional iSize As Integer) As Picture
|
||||
|
||||
Dim hPict As Picture
|
||||
Dim hImage As Image
|
||||
Dim hImageModule As Image
|
||||
Dim sKey As String
|
||||
|
||||
If Not $hFileImage Then $hFileImage = Image.Load("icon:/" & iSize & "/file")
|
||||
If Not $hFileImage Then $hFileImage = Picture["icon:/32/file"].Image
|
||||
|
||||
hImage = $hFileImage.Copy()
|
||||
hImageModule = Image.Load("module" &/ sModule & ".png").Stretch(iSize, iSize)
|
||||
hImage.Draw(hImageModule, 0, 0)
|
||||
Return hImage.Picture
|
||||
If iSize = 0 Then iSize = 16
|
||||
|
||||
sKey = "img/" & sModule & "-" & iSize & ".png"
|
||||
hPict = Picture[sKey]
|
||||
If Not hPict Then
|
||||
hImage = $hFileImage.Stretch(iSize, iSize)
|
||||
If iSize = 16 Then
|
||||
hImageModule = Image.Load("img/module" &/ sModule & "-16.png")
|
||||
Else
|
||||
hImageModule = Image.Load("img/module" &/ sModule & ".png").Stretch(iSize, iSize)
|
||||
Endif
|
||||
hImage.Draw(hImageModule, 0, 0)
|
||||
hPict = hImage.Picture
|
||||
Picture[sKey] = hPict
|
||||
Endif
|
||||
|
||||
Return hPict
|
||||
|
||||
End
|
||||
|
||||
|
||||
|
||||
|
||||
Public Sub GetFileIcon(sPath As String, Optional iSize As Integer) As Picture
|
||||
|
||||
Dim hImage As Image
|
||||
|
@ -573,6 +586,7 @@ Public Sub GetFileIcon(sPath As String, Optional iSize As Integer) As Picture
|
|||
Dim iDim As Integer
|
||||
Dim bConflict As Boolean
|
||||
Dim hConflict As Image
|
||||
Dim sModule As String
|
||||
|
||||
If iSize Then
|
||||
sPrefix = "icon:/" & iSize
|
||||
|
@ -600,11 +614,8 @@ Public Sub GetFileIcon(sPath As String, Optional iSize As Integer) As Picture
|
|||
|
||||
Case "form", "class", "module", "webpage"
|
||||
If File.Dir(sPath) = Project.Dir Then
|
||||
If iSize > 16 Then
|
||||
sIcon = "img/32" &/ sExt & ".png"
|
||||
Else
|
||||
sIcon = "img/16" &/ sExt & ".png"
|
||||
Endif
|
||||
sModule = sExt
|
||||
sIcon = sExt & "-" & iSize
|
||||
bStartup = File.BaseName(sPath) = Startup And Not bNoStartup
|
||||
Endif
|
||||
|
||||
|
@ -684,7 +695,11 @@ Public Sub GetFileIcon(sPath As String, Optional iSize As Integer) As Picture
|
|||
Try hPict = Picture[sKey]
|
||||
If Not hPict Then
|
||||
|
||||
hPict = Picture[sIcon]
|
||||
If sModule Then
|
||||
hPict = MakeModuleIcon(sModule, iSize)
|
||||
Else
|
||||
hPict = Picture[sIcon]
|
||||
Endif
|
||||
If Not hPict Then hPict = Picture[sPrefix &/ "file"]
|
||||
If Not hPict Then hPict = Picture["img/16/unknown.png"]
|
||||
hPict = hPict.Copy()
|
||||
|
|
BIN
app/src/gambas3/img/module/class-16.png
Normal file
After Width: | Height: | Size: 252 B |
Before Width: | Height: | Size: 271 B After Width: | Height: | Size: 385 B |
BIN
app/src/gambas3/img/module/form-16.png
Normal file
After Width: | Height: | Size: 295 B |
Before Width: | Height: | Size: 436 B After Width: | Height: | Size: 605 B |
BIN
app/src/gambas3/img/module/module-16.png
Normal file
After Width: | Height: | Size: 230 B |
Before Width: | Height: | Size: 285 B After Width: | Height: | Size: 315 B |
BIN
app/src/gambas3/img/module/webpage-16.png
Normal file
After Width: | Height: | Size: 648 B |
Before Width: | Height: | Size: 103 B After Width: | Height: | Size: 1.3 KiB |
6
gb.db.firebird/src/gb.db.firebird.component
Normal file
|
@ -0,0 +1,6 @@
|
|||
[Component]
|
||||
Key=gb.db.firebird
|
||||
Author=Daniel Vostanikian
|
||||
State=0
|
||||
Require=gb.db
|
||||
|
6
gb.db.odbc/src/gb.db.odbc.component
Normal file
|
@ -0,0 +1,6 @@
|
|||
[Component]
|
||||
Key=gb.db.odbc
|
||||
Author=Andrea Bortolan,Benoît Minisini
|
||||
State=0
|
||||
Require=gb.db
|
||||
|
6
gb.db.postgresql/src/gb.db.postgresql.component
Normal file
|
@ -0,0 +1,6 @@
|
|||
[Component]
|
||||
Key=gb.db.postgresql
|
||||
Author=Benoît Minisini
|
||||
State=0
|
||||
Require=gb.db
|
||||
|
6
gb.db.sqlite2/src/gb.db.sqlite2.component
Normal file
|
@ -0,0 +1,6 @@
|
|||
[Component]
|
||||
Key=gb.db.sqlite2
|
||||
Author=Nigel Gerrard,Benoît Minisini
|
||||
State=0
|
||||
Require=gb.db
|
||||
|
6
gb.db.sqlite3/src/gb.db.sqlite3.component
Normal file
|
@ -0,0 +1,6 @@
|
|||
[Component]
|
||||
Key=gb.db.sqlite3
|
||||
Author=Nigel Gerrard,Benoît Minisini
|
||||
State=0
|
||||
Require=gb.db
|
||||
|