[DEVELOPMENT ENVIRONMENT]
* BUG: Form editor: Don't show the name of the control in buttons if a picture is defined. * BUG: Correctly refresh the icons everywhere when the startup class is changed. git-svn-id: svn://localhost/gambas/trunk@6981 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
parent
f56439725e
commit
59f1c91db0
5 changed files with 39 additions and 9 deletions
|
@ -110,7 +110,7 @@ Static Public Sub _init()
|
|||
|
||||
$cUpdateName["ComboBox.ReadOnly"] = True
|
||||
$cUpdateName["Text"] = True
|
||||
$cUpdateName["Button.Picture"] = True
|
||||
$cUpdateName["Picture"] = True
|
||||
|
||||
$cAlwaysRead["RadioButton.Value"] = True
|
||||
$cAlwaysRead["ToggleButton.Value"] = True
|
||||
|
|
|
@ -909,8 +909,8 @@ Private Sub AddEmblem(hSource As Image, sEmblem As String) As Image
|
|||
|
||||
hEmblem = Picture[sEmblem].Image
|
||||
|
||||
iSize = hEmblem.W * hSource.W / 64 * 1.25
|
||||
hEmblem = hEmblem.Stretch(iSize, iSize * hEmblem.H / hEmblem.W)
|
||||
iSize = Min(hEmblem.H, hSource.H / 2)
|
||||
hEmblem = hEmblem.Stretch(-1, iSize) ', iSize * hEmblem.H / hEmblem.W)
|
||||
|
||||
iSize -= hSource.W \ 4
|
||||
|
||||
|
@ -979,8 +979,9 @@ Public Sub MakeModuleIcon(sModule As String, iSize As Integer, Optional bStartup
|
|||
'If bExported Then MakeExportedIcon(hImage)
|
||||
|
||||
If bStartup Then
|
||||
hImageStartup = Image.Load("img/16/startup.png").Stretch(iSize \ 2, iSize \ 2)
|
||||
hImage.PaintImage(hImageStartup, 0, (hImage.H - hImageStartup.H) \ 2)
|
||||
hImage = AddEmblem(hImage, "img/32/startup.png")
|
||||
'hImageStartup = Image.Load("img/16/startup.png").Stretch((iSize * 2) \ 3, (iSize * 2) \ 3)
|
||||
'hImage.PaintImage(hImageStartup, 0, (hImage.H - hImageStartup.H) \ 2)
|
||||
Endif
|
||||
|
||||
$cImageCache[sKey] = hImage
|
||||
|
@ -1446,9 +1447,8 @@ Private Sub AddFile(sDir As String, sFile As String, Optional bAfter As Boolean,
|
|||
bDir = False
|
||||
Endif
|
||||
Endif
|
||||
|
||||
hForm = Files[sKey]
|
||||
If hForm Then hForm.Icon = GetFileIcon(sKey, 16)
|
||||
|
||||
RefreshIcon(sKey)
|
||||
|
||||
Endif
|
||||
|
||||
|
@ -6111,3 +6111,24 @@ Public Sub OnVendorKeyPress()
|
|||
Endif
|
||||
|
||||
End
|
||||
|
||||
Private Sub RefreshIcon(sPath As String)
|
||||
|
||||
Dim hForm As Object
|
||||
|
||||
hForm = Files[sPath]
|
||||
If hForm Then hForm.Icon = GetFileIcon(sPath, 16)
|
||||
|
||||
If IsSourcePath(sPath) Then
|
||||
If File.Ext(sPath) = "class" Then
|
||||
sPath = FindForm(File.BaseName(sPath))
|
||||
Else
|
||||
sPath = File.SetExt(sPath, "class")
|
||||
Endif
|
||||
|
||||
hForm = Files[sPath]
|
||||
If hForm Then hForm.Icon = GetFileIcon(sPath, 16)
|
||||
|
||||
Endif
|
||||
|
||||
End
|
Binary file not shown.
Before Width: | Height: | Size: 190 B |
BIN
app/src/gambas3/img/32/startup.png
Normal file
BIN
app/src/gambas3/img/32/startup.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 232 B |
|
@ -11,9 +11,18 @@
|
|||
MoveScaled(11,18,24,4)
|
||||
}
|
||||
{ Label1 Label
|
||||
MoveScaled(39,43,24,4)
|
||||
MoveScaled(32,25,24,4)
|
||||
Text = ("gfdf")
|
||||
}
|
||||
{ ToggleButton1 ToggleButton
|
||||
MoveScaled(12,34,16,4)
|
||||
}
|
||||
{ Button1 Button
|
||||
MoveScaled(31,36,10,4)
|
||||
Picture = Picture["img/16/cross.png"]
|
||||
}
|
||||
{ ToolButton1 ToolButton
|
||||
MoveScaled(22,43,14,4)
|
||||
Picture = Picture["img/16/cross.png"]
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue