jvcllaz: Fix JvHMI package name case. Fix compilation in Linux. Add color selection to demo program of DialButton.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6946 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
parent
bc9e8f14dc
commit
bf30233549
@ -1,11 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CONFIG>
|
||||
<ProjectOptions>
|
||||
<Version Value="11"/>
|
||||
<Version Value="12"/>
|
||||
<PathDelim Value="\"/>
|
||||
<General>
|
||||
<Flags>
|
||||
<CompatibilityMode Value="True"/>
|
||||
</Flags>
|
||||
<SessionStorage Value="InProjectDir"/>
|
||||
<MainUnit Value="0"/>
|
||||
<Title Value="JvDialButtonDemo"/>
|
||||
<Scaled Value="True"/>
|
||||
<ResourceType Value="res"/>
|
||||
@ -28,7 +30,7 @@
|
||||
</RunParams>
|
||||
<RequiredPackages Count="2">
|
||||
<Item1>
|
||||
<PackageName Value="jvhmilazr"/>
|
||||
<PackageName Value="JvHMILazR"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<PackageName Value="LCL"/>
|
||||
|
@ -2,10 +2,10 @@ object Form1: TForm1
|
||||
Left = 345
|
||||
Height = 290
|
||||
Top = 131
|
||||
Width = 320
|
||||
Width = 363
|
||||
Caption = 'Form1'
|
||||
ClientHeight = 290
|
||||
ClientWidth = 320
|
||||
ClientWidth = 363
|
||||
OnCreate = FormCreate
|
||||
LCLVersion = '2.1.0.0'
|
||||
object JvDialButton1: TJvDialButton
|
||||
@ -17,7 +17,6 @@ object Form1: TForm1
|
||||
Color = clMoneyGreen
|
||||
DefaultPos = 0
|
||||
ParentColor = False
|
||||
PointerPenWidth = 3
|
||||
Radius = 48
|
||||
TickStyle = tsAuto
|
||||
TabOrder = 0
|
||||
@ -25,65 +24,65 @@ object Form1: TForm1
|
||||
end
|
||||
object JvLED1: TJvLED
|
||||
Left = 197
|
||||
Top = 24
|
||||
Top = 8
|
||||
ColorOn = clRed
|
||||
ColorOff = clMaroon
|
||||
Status = False
|
||||
end
|
||||
object JvLED2: TJvLED
|
||||
Left = 197
|
||||
Top = 40
|
||||
Top = 24
|
||||
ColorOn = clRed
|
||||
ColorOff = clMaroon
|
||||
Status = False
|
||||
end
|
||||
object JvLED3: TJvLED
|
||||
Left = 197
|
||||
Top = 56
|
||||
Top = 40
|
||||
ColorOn = clYellow
|
||||
ColorOff = clOlive
|
||||
Status = False
|
||||
end
|
||||
object JvLED4: TJvLED
|
||||
Left = 197
|
||||
Top = 72
|
||||
Top = 56
|
||||
ColorOn = clYellow
|
||||
ColorOff = clOlive
|
||||
Status = False
|
||||
end
|
||||
object JvLED5: TJvLED
|
||||
Left = 197
|
||||
Top = 88
|
||||
Top = 72
|
||||
ColorOff = clGreen
|
||||
Status = False
|
||||
end
|
||||
object JvLED6: TJvLED
|
||||
Left = 197
|
||||
Top = 104
|
||||
Top = 88
|
||||
ColorOff = clGreen
|
||||
Status = False
|
||||
end
|
||||
object JvLED7: TJvLED
|
||||
Left = 197
|
||||
Top = 120
|
||||
Top = 104
|
||||
ColorOff = clGreen
|
||||
Status = False
|
||||
end
|
||||
object JvLED8: TJvLED
|
||||
Left = 197
|
||||
Top = 136
|
||||
Top = 120
|
||||
ColorOff = clGreen
|
||||
Status = False
|
||||
end
|
||||
object JvLED9: TJvLED
|
||||
Left = 197
|
||||
Top = 152
|
||||
Top = 136
|
||||
ColorOff = clGreen
|
||||
Status = False
|
||||
end
|
||||
object JvLED10: TJvLED
|
||||
Left = 197
|
||||
Top = 168
|
||||
Top = 152
|
||||
ColorOff = clGreen
|
||||
Status = False
|
||||
end
|
||||
@ -136,4 +135,22 @@ object Form1: TForm1
|
||||
TabOrder = 2
|
||||
Text = 'bsNone'
|
||||
end
|
||||
object cbColor: TColorBox
|
||||
Left = 192
|
||||
Height = 24
|
||||
Top = 201
|
||||
Width = 128
|
||||
Selected = clMoneyGreen
|
||||
ItemHeight = 16
|
||||
OnChange = cbColorChange
|
||||
TabOrder = 3
|
||||
end
|
||||
object Label1: TLabel
|
||||
Left = 192
|
||||
Height = 15
|
||||
Top = 184
|
||||
Width = 29
|
||||
Caption = 'Color'
|
||||
ParentColor = False
|
||||
end
|
||||
end
|
||||
|
@ -5,8 +5,8 @@ unit JvDialButtonDemoForm;
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls, JvDialButton,
|
||||
JvLED;
|
||||
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls, ColorBox,
|
||||
JvDialButton, JvLED;
|
||||
|
||||
type
|
||||
|
||||
@ -15,6 +15,7 @@ type
|
||||
TForm1 = class(TForm)
|
||||
cmbPointerShape: TComboBox;
|
||||
cmbBorderStyle: TComboBox;
|
||||
cbColor: TColorBox;
|
||||
JvDialButton1: TJvDialButton;
|
||||
JvLED1: TJvLED;
|
||||
JvLED10: TJvLED;
|
||||
@ -26,10 +27,12 @@ type
|
||||
JvLED7: TJvLED;
|
||||
JvLED8: TJvLED;
|
||||
JvLED9: TJvLED;
|
||||
Label1: TLabel;
|
||||
lblPointerShape: TLabel;
|
||||
lblBorderStyle: TLabel;
|
||||
procedure cmbBorderStyleChange(Sender: TObject);
|
||||
procedure cmbPointerShapeChange(Sender: TObject);
|
||||
procedure cbColorChange(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure JvDialButton1Change(Sender: TObject);
|
||||
private
|
||||
@ -81,6 +84,11 @@ begin
|
||||
JvDialButton1.PointerShape := TJvDialPointerShape(cmbPointerShape.ItemIndex);
|
||||
end;
|
||||
|
||||
procedure TForm1.cbColorChange(Sender: TObject);
|
||||
begin
|
||||
JvDialButton1.Color := cbColor.Selected;
|
||||
end;
|
||||
|
||||
procedure TForm1.cmbBorderStyleChange(Sender: TObject);
|
||||
begin
|
||||
case cmbBorderStyle.ItemIndex of
|
||||
|
@ -1,11 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CONFIG>
|
||||
<ProjectOptions>
|
||||
<Version Value="11"/>
|
||||
<Version Value="12"/>
|
||||
<PathDelim Value="\"/>
|
||||
<General>
|
||||
<Flags>
|
||||
<CompatibilityMode Value="True"/>
|
||||
</Flags>
|
||||
<SessionStorage Value="InProjectDir"/>
|
||||
<MainUnit Value="0"/>
|
||||
<Title Value="JvLEDDemo"/>
|
||||
<Scaled Value="True"/>
|
||||
<ResourceType Value="res"/>
|
||||
@ -27,7 +29,7 @@
|
||||
</RunParams>
|
||||
<RequiredPackages Count="2">
|
||||
<Item1>
|
||||
<PackageName Value="jvhmilazr"/>
|
||||
<PackageName Value="JvHMILazR"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<PackageName Value="LCL"/>
|
||||
|
@ -2,7 +2,7 @@
|
||||
<CONFIG>
|
||||
<Package Version="4">
|
||||
<PathDelim Value="\"/>
|
||||
<Name Value="jvhmilazd"/>
|
||||
<Name Value="JvHMILazD"/>
|
||||
<Type Value="RunAndDesignTime"/>
|
||||
<Author Value="Various authors - see header of each unit for original author."/>
|
||||
<CompilerOptions>
|
||||
@ -32,7 +32,7 @@
|
||||
<PackageName Value="JvCoreLazD"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<PackageName Value="jvhmilazr"/>
|
||||
<PackageName Value="JvHMILazR"/>
|
||||
</Item2>
|
||||
</RequiredPkgs>
|
||||
<UsageOptions>
|
||||
|
@ -2,7 +2,7 @@
|
||||
<CONFIG>
|
||||
<Package Version="4">
|
||||
<PathDelim Value="\"/>
|
||||
<Name Value="jvhmilazr"/>
|
||||
<Name Value="JvHMILazR"/>
|
||||
<Author Value="Various authors - see header of each unit for original author."/>
|
||||
<CompilerOptions>
|
||||
<Version Value="11"/>
|
||||
@ -29,13 +29,10 @@
|
||||
<UnitName Value="JvLED"/>
|
||||
</Item2>
|
||||
</Files>
|
||||
<RequiredPkgs Count="2">
|
||||
<RequiredPkgs Count="1">
|
||||
<Item1>
|
||||
<PackageName Value="JvCoreLazR"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<PackageName Value="LCL"/>
|
||||
</Item2>
|
||||
</RequiredPkgs>
|
||||
<UsageOptions>
|
||||
<UnitPath Value="$(PkgOutDir)"/>
|
||||
|
@ -125,8 +125,8 @@ type
|
||||
// procedure CMCtl3DChanged(var Msg: TLMessage); message CM_CTL3DCHANGED;
|
||||
// procedure WMSysColorChange(var Msg: TLMessage); message LM_SYSCOLORCHANGE;
|
||||
// procedure WndProc(var Msg: TLMessage); override;
|
||||
procedure FocusSet(PrevWnd: THandle); override;
|
||||
procedure FocusKilled(NextWnd: THandle); override;
|
||||
// procedure FocusSet(PrevWnd: THandle); override;
|
||||
// procedure FocusKilled(NextWnd: THandle); override;
|
||||
procedure ColorChanged; override;
|
||||
procedure ParentColorChanged; override;
|
||||
procedure DrawBorder; dynamic;
|
||||
@ -929,7 +929,6 @@ const
|
||||
HalfPi = 1.57079632679489661923;
|
||||
var
|
||||
Edge: Integer;
|
||||
ButtonRect: TRect;
|
||||
Face, Highlight, Shadow: TColor;
|
||||
Size: Integer;
|
||||
OldOrg: TPoint;
|
||||
@ -938,7 +937,6 @@ var
|
||||
lColor: TColor;
|
||||
begin
|
||||
Size := 2 * FRadius + 1;
|
||||
ButtonRect := Bounds(0, 0, Size, Size);
|
||||
lCanvas := FBitmap.Canvas;
|
||||
lCanvas.Brush.Color := Parent.Brush.Color;
|
||||
lCanvas.Brush.Style := bsSolid;
|
||||
@ -1072,6 +1070,8 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
{ - strange: does not compile in qt with these methods...
|
||||
|
||||
procedure TJvCustomDialButton.FocusKilled(NextWnd: THandle);
|
||||
begin
|
||||
inherited FocusKilled(NextWnd);
|
||||
@ -1085,7 +1085,7 @@ begin
|
||||
if HandleAllocated then
|
||||
DrawBorder;
|
||||
end;
|
||||
|
||||
}
|
||||
procedure TJvCustomDialButton.MouseDown(Button: TMouseButton;
|
||||
Shift: TShiftState; X, Y: Integer);
|
||||
var
|
||||
|
Loading…
Reference in New Issue
Block a user