You've already forked lazarus-ccr
ColorPalette: Add off-line version of wiki page as chm file. Default value of Pickmode is pmImmediate now.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4285 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
BIN
components/colorpalette/colorpalette-wiki.chm
Normal file
BIN
components/colorpalette/colorpalette-wiki.chm
Normal file
Binary file not shown.
@ -132,14 +132,14 @@ type
|
||||
property ColumnCount: Integer read FCols write SetCols;
|
||||
property GradientSteps: Byte read FGradientSteps write SetGradientSteps default 3;
|
||||
property PaletteKind: TPaletteKind read FPaletteKind write SetPaletteKind default pkStandardPalette;
|
||||
property PickMode: TPickMode read FPickMode write FPickMode default pmDefault;
|
||||
property PickMode: TPickMode read FPickMode write FPickMode default pmImmediate;
|
||||
property PickShift: TPickShift read FPickShift write FPickShift default [ssLeft];
|
||||
property SelectedIndex: Integer read FSelectedIndex write SetSelectedIndex default 0;
|
||||
property ShowColorHint: Boolean read FShowColorHint write FShowColorHint default true;
|
||||
property ShowSelection: Boolean read FShowSelection write SetShowSelection default false;
|
||||
|
||||
public
|
||||
constructor Create(TheOwner: TComponent); override;
|
||||
constructor Create(AOwner: TComponent); override;
|
||||
destructor Destroy; override;
|
||||
procedure Paint; override;
|
||||
|
||||
@ -226,7 +226,7 @@ end;
|
||||
|
||||
{ TCustomColorPalette }
|
||||
|
||||
constructor TCustomColorPalette.Create(TheOwner: TComponent);
|
||||
constructor TCustomColorPalette.Create(AOwner: TComponent);
|
||||
begin
|
||||
inherited;
|
||||
ControlStyle := ControlStyle + [csFixedWidth, csFixedHeight];
|
||||
@ -237,10 +237,10 @@ begin
|
||||
FButtonWidth := 12;
|
||||
FButtonHeight := 12;
|
||||
FPrevMouseIndex := -1;
|
||||
FPickMode := pmImmediate;
|
||||
FPickShift := [ssLeft];
|
||||
FShowColorHint := true;
|
||||
FGradientSteps := 3;
|
||||
|
||||
FCols := 8;
|
||||
SetPaletteKind(pkStandardPalette);
|
||||
|
||||
@ -799,11 +799,13 @@ begin
|
||||
end;
|
||||
|
||||
if FPaletteKind = pkWebSafePalette then
|
||||
begin
|
||||
// https://en.wikipedia.org/wiki/Web_colors
|
||||
for g := 0 to 5 do
|
||||
for b:= 0 to 5 do
|
||||
for r:=0 to 5 do
|
||||
DoAddColor(RGBToColor(r*$33, g*$33, b*$33));
|
||||
end;
|
||||
|
||||
if FPaletteKind = pkWebSafePalette2 then
|
||||
begin
|
||||
|
@ -1,7 +1,7 @@
|
||||
object MainForm: TMainForm
|
||||
Left = 374
|
||||
Left = 394
|
||||
Height = 535
|
||||
Top = 222
|
||||
Top = 287
|
||||
Width = 625
|
||||
Caption = 'MainForm'
|
||||
ClientHeight = 535
|
||||
@ -313,8 +313,8 @@ object MainForm: TMainForm
|
||||
Height = 519
|
||||
Top = 8
|
||||
Width = 287
|
||||
HorzScrollBar.Increment = 14
|
||||
HorzScrollBar.Page = 145
|
||||
HorzScrollBar.Increment = 12
|
||||
HorzScrollBar.Page = 129
|
||||
HorzScrollBar.Smooth = True
|
||||
HorzScrollBar.Tracking = True
|
||||
VertScrollBar.Increment = 3
|
||||
@ -331,11 +331,10 @@ object MainForm: TMainForm
|
||||
Height = 33
|
||||
Hint = 'Click to select a color'
|
||||
Top = 1
|
||||
Width = 145
|
||||
Width = 129
|
||||
ButtonWidth = 16
|
||||
ButtonHeight = 16
|
||||
ColumnCount = 9
|
||||
GradientSteps = 3
|
||||
ColumnCount = 8
|
||||
PickShift = [ssLeft, ssMiddle]
|
||||
OnSelectColor = ColorPaletteSelectColor
|
||||
PopupMenu = PalettePopupMenu
|
||||
|
@ -266,6 +266,13 @@ procedure TMainForm.FormCreate(Sender: TObject);
|
||||
begin
|
||||
EdColCount.Value := ColorPalette.ColumnCount;
|
||||
EdGradientSteps.Value := ColorPalette.GradientSteps;
|
||||
CbPickMode.ItemIndex := ord(ColorPalette.PickMode);
|
||||
CbShowSelection.Checked := ColorPalette.ShowSelection;
|
||||
CbShowColorHints.Checked := ColorPalette.ShowColorHint;
|
||||
CbBorderColor.Selected := ColorPalette.SelectedColor;
|
||||
EdBorderWidth.Value := ColorPalette.BorderWidth;
|
||||
EdBoxSize.Value := ColorPalette.ButtonWidth;
|
||||
|
||||
ColorSample.Brush.Color := ColorPalette.SelectedColor;
|
||||
SetColorInfo('Current', ColorPalette.SelectedColor);
|
||||
UpdateCaption;
|
||||
|
@ -1,23 +1,24 @@
|
||||
<?xml version="1.0"?>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CONFIG>
|
||||
<Package Version="2">
|
||||
<Package Version="4">
|
||||
<PathDelim Value="\"/>
|
||||
<Name Value="LazColorPalette"/>
|
||||
<Author Value="Tom Gregorovic (_tom_@centrum.cz)"/>
|
||||
<Type Value="RunAndDesignTime"/>
|
||||
<AddToProjectUsesSection Value="True"/>
|
||||
<Author Value="Tom Gregorovic (_tom_@centrum.cz), Werner Pamler"/>
|
||||
<CompilerOptions>
|
||||
<Version Value="5"/>
|
||||
<Version Value="11"/>
|
||||
<PathDelim Value="\"/>
|
||||
<SearchPaths>
|
||||
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)\"/>
|
||||
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<CodeGeneration>
|
||||
<Generate Value="Faster"/>
|
||||
</CodeGeneration>
|
||||
<Other>
|
||||
<CompilerPath Value="$(CompPath)"/>
|
||||
</Other>
|
||||
<Parsing>
|
||||
<SyntaxOptions>
|
||||
<UseAnsiStrings Value="False"/>
|
||||
</SyntaxOptions>
|
||||
</Parsing>
|
||||
</CompilerOptions>
|
||||
<Description Value="This package contains color palette component."/>
|
||||
<Description Value="This package contains a color palette component."/>
|
||||
<License Value="Modified LGPL"/>
|
||||
<Version Minor="1"/>
|
||||
<Files Count="2">
|
||||
@ -31,7 +32,6 @@
|
||||
<UnitName Value="ColorPalette"/>
|
||||
</Item2>
|
||||
</Files>
|
||||
<Type Value="RunAndDesignTime"/>
|
||||
<RequiredPkgs Count="2">
|
||||
<Item1>
|
||||
<PackageName Value="LCL"/>
|
||||
@ -42,7 +42,7 @@
|
||||
</Item2>
|
||||
</RequiredPkgs>
|
||||
<UsageOptions>
|
||||
<UnitPath Value="$(PkgOutDir)\"/>
|
||||
<UnitPath Value="$(PkgOutDir)"/>
|
||||
</UsageOptions>
|
||||
<PublishOptions>
|
||||
<Version Value="2"/>
|
||||
|
Reference in New Issue
Block a user