You've already forked lazarus-ccr
mbColorLib: Some more layout improvements of demo forms
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5567 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@ -23,13 +23,14 @@ type
|
|||||||
Bevel1: TBevel;
|
Bevel1: TBevel;
|
||||||
CbShowHints: TCheckBox;
|
CbShowHints: TCheckBox;
|
||||||
CbEnabled: TCheckBox;
|
CbEnabled: TCheckBox;
|
||||||
Label10: TLabel;
|
LblGAxisPicker: TLabel;
|
||||||
Label11: TLabel;
|
LblRAxisPicker: TLabel;
|
||||||
Label12: TLabel;
|
LblBAxisPicker: TLabel;
|
||||||
Label13: TLabel;
|
LblCIELColorPicker: TLabel;
|
||||||
Label14: TLabel;
|
LblCIEAColorPicker: TLabel;
|
||||||
Label15: TLabel;
|
LblCIEBColorPicker: TLabel;
|
||||||
PageControl1: TPageControl;
|
PageControl1: TPageControl;
|
||||||
|
RightPanel: TPanel;
|
||||||
TabSheet1: TTabSheet;
|
TabSheet1: TTabSheet;
|
||||||
TabSheet2: TTabSheet;
|
TabSheet2: TTabSheet;
|
||||||
TabSheet3: TTabSheet;
|
TabSheet3: TTabSheet;
|
||||||
@ -37,10 +38,10 @@ type
|
|||||||
HSLColorPicker1: THSLColorPicker;
|
HSLColorPicker1: THSLColorPicker;
|
||||||
sc: TmbColorPreview;
|
sc: TmbColorPreview;
|
||||||
uc: TmbColorPreview;
|
uc: TmbColorPreview;
|
||||||
Label1: TLabel;
|
LblSelectedColor: TLabel;
|
||||||
tb1: TTrackBar;
|
tb1: TTrackBar;
|
||||||
tb2: TTrackBar;
|
tb2: TTrackBar;
|
||||||
Label2: TLabel;
|
LblColorUnderCursor: TLabel;
|
||||||
HexaColorPicker1: THexaColorPicker;
|
HexaColorPicker1: THexaColorPicker;
|
||||||
mbColorPalette1: TmbColorPalette;
|
mbColorPalette1: TmbColorPalette;
|
||||||
BtnBluePalette: TButton;
|
BtnBluePalette: TButton;
|
||||||
@ -64,10 +65,10 @@ type
|
|||||||
HRingPicker1: THRingPicker;
|
HRingPicker1: THRingPicker;
|
||||||
VColorPicker2: TVColorPicker;
|
VColorPicker2: TVColorPicker;
|
||||||
CheckBox1: TCheckBox;
|
CheckBox1: TCheckBox;
|
||||||
ComboBox1: TComboBox;
|
CbMarker: TComboBox;
|
||||||
Label4: TLabel;
|
Label4: TLabel;
|
||||||
CheckBox2: TCheckBox;
|
CheckBox2: TCheckBox;
|
||||||
Label5: TLabel;
|
LblInfo: TLabel;
|
||||||
BtnLoadPal: TButton;
|
BtnLoadPal: TButton;
|
||||||
OpenDialog1: TOpenDialog;
|
OpenDialog1: TOpenDialog;
|
||||||
ScrollBox1: TScrollBox;
|
ScrollBox1: TScrollBox;
|
||||||
@ -151,7 +152,7 @@ type
|
|||||||
procedure VColorPicker2Change(Sender: TObject);
|
procedure VColorPicker2Change(Sender: TObject);
|
||||||
procedure FormCreate(Sender: TObject);
|
procedure FormCreate(Sender: TObject);
|
||||||
procedure CheckBox1Click(Sender: TObject);
|
procedure CheckBox1Click(Sender: TObject);
|
||||||
procedure ComboBox1Change(Sender: TObject);
|
procedure CbMarkerChange(Sender: TObject);
|
||||||
procedure CheckBox2Click(Sender: TObject);
|
procedure CheckBox2Click(Sender: TObject);
|
||||||
procedure BtnLoadPalClick(Sender: TObject);
|
procedure BtnLoadPalClick(Sender: TObject);
|
||||||
procedure CbSortDirChange(Sender: TObject);
|
procedure CbSortDirChange(Sender: TObject);
|
||||||
@ -353,9 +354,9 @@ begin
|
|||||||
HexaColorPicker1.SliderVisible := checkbox1.Checked;
|
HexaColorPicker1.SliderVisible := checkbox1.Checked;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TForm1.ComboBox1Change(Sender: TObject);
|
procedure TForm1.CbMarkerChange(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
hexacolorpicker1.SliderMarker := TMArker(ComboBox1.ItemIndex);
|
hexacolorpicker1.SliderMarker := TMArker(CbMarker.ItemIndex);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TForm1.CheckBox2Click(Sender: TObject);
|
procedure TForm1.CheckBox2Click(Sender: TObject);
|
||||||
|
@ -14,10 +14,10 @@ object Form1: TForm1
|
|||||||
Height = 429
|
Height = 429
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 400
|
Width = 400
|
||||||
ActivePage = tabHorizontal
|
ActivePage = tabVertical
|
||||||
Align = alClient
|
Align = alClient
|
||||||
Anchors = [akTop, akRight]
|
Anchors = [akTop, akRight]
|
||||||
TabIndex = 1
|
TabIndex = 0
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
object tabVertical: TTabSheet
|
object tabVertical: TTabSheet
|
||||||
Caption = 'vertical'
|
Caption = 'vertical'
|
||||||
@ -73,11 +73,14 @@ object Form1: TForm1
|
|||||||
Anchors = [akLeft, akBottom]
|
Anchors = [akLeft, akBottom]
|
||||||
end
|
end
|
||||||
object rbHSVv: TRadioButton
|
object rbHSVv: TRadioButton
|
||||||
Left = 328
|
AnchorSideLeft.Control = rbHSLv
|
||||||
|
AnchorSideLeft.Side = asrBottom
|
||||||
|
Left = 323
|
||||||
Height = 19
|
Height = 19
|
||||||
Top = 305
|
Top = 305
|
||||||
Width = 42
|
Width = 42
|
||||||
Anchors = [akLeft, akBottom]
|
Anchors = [akLeft, akBottom]
|
||||||
|
BorderSpacing.Left = 2
|
||||||
Caption = 'HSV'
|
Caption = 'HSV'
|
||||||
OnChange = rbHSLv_Change
|
OnChange = rbHSLv_Change
|
||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
@ -110,7 +113,7 @@ object Form1: TForm1
|
|||||||
Caption = 'S'
|
Caption = 'S'
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
end
|
end
|
||||||
object Label8: TLabel
|
object LblH: TLabel
|
||||||
Left = 288
|
Left = 288
|
||||||
Height = 15
|
Height = 15
|
||||||
Top = 8
|
Top = 8
|
||||||
@ -142,7 +145,7 @@ object Form1: TForm1
|
|||||||
Caption = 'M'
|
Caption = 'M'
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
end
|
end
|
||||||
object Label4: TLabel
|
object LblC: TLabel
|
||||||
Left = 136
|
Left = 136
|
||||||
Height = 15
|
Height = 15
|
||||||
Top = 8
|
Top = 8
|
||||||
@ -166,7 +169,7 @@ object Form1: TForm1
|
|||||||
Caption = 'G'
|
Caption = 'G'
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
end
|
end
|
||||||
object Label1: TLabel
|
object LblR: TLabel
|
||||||
Left = 13
|
Left = 13
|
||||||
Height = 15
|
Height = 15
|
||||||
Top = 8
|
Top = 8
|
||||||
@ -175,9 +178,10 @@ object Form1: TForm1
|
|||||||
ParentColor = False
|
ParentColor = False
|
||||||
end
|
end
|
||||||
object VColorPickerV: TVColorPicker
|
object VColorPickerV: TVColorPicker
|
||||||
|
AnchorSideTop.Control = HColorPickerV
|
||||||
Left = 368
|
Left = 368
|
||||||
Height = 278
|
Height = 279
|
||||||
Top = 24
|
Top = 23
|
||||||
Width = 22
|
Width = 22
|
||||||
HintFormat = 'Value: %value'
|
HintFormat = 'Value: %value'
|
||||||
Layout = lyVertical
|
Layout = lyVertical
|
||||||
@ -190,9 +194,10 @@ object Form1: TForm1
|
|||||||
SelectedColor = clWhite
|
SelectedColor = clWhite
|
||||||
end
|
end
|
||||||
object LColorPickerV: TLColorPicker
|
object LColorPickerV: TLColorPicker
|
||||||
|
AnchorSideTop.Control = HColorPickerV
|
||||||
Left = 350
|
Left = 350
|
||||||
Height = 278
|
Height = 279
|
||||||
Top = 24
|
Top = 23
|
||||||
Width = 22
|
Width = 22
|
||||||
HintFormat = 'Luminance: %value'
|
HintFormat = 'Luminance: %value'
|
||||||
Layout = lyVertical
|
Layout = lyVertical
|
||||||
@ -200,14 +205,16 @@ object Form1: TForm1
|
|||||||
TabOrder = 6
|
TabOrder = 6
|
||||||
OnChange = SLVPickerV_Change
|
OnChange = SLVPickerV_Change
|
||||||
Hue = 0
|
Hue = 0
|
||||||
Saturation = 240
|
Saturation = 0
|
||||||
Luminance = 239
|
Luminance = 240
|
||||||
SelectedColor = 16645631
|
SelectedColor = 15790320
|
||||||
end
|
end
|
||||||
object HColorPickerV: THColorPicker
|
object HColorPickerV: THColorPicker
|
||||||
|
AnchorSideTop.Control = LblH
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 288
|
Left = 288
|
||||||
Height = 278
|
Height = 279
|
||||||
Top = 24
|
Top = 23
|
||||||
Width = 22
|
Width = 22
|
||||||
HintFormat = 'Hue: %value'
|
HintFormat = 'Hue: %value'
|
||||||
Layout = lyVertical
|
Layout = lyVertical
|
||||||
@ -219,22 +226,24 @@ object Form1: TForm1
|
|||||||
Value = 255
|
Value = 255
|
||||||
end
|
end
|
||||||
object KColorPickerV: TKColorPicker
|
object KColorPickerV: TKColorPicker
|
||||||
|
AnchorSideTop.Control = CColorPickerV
|
||||||
Left = 232
|
Left = 232
|
||||||
Height = 296
|
Height = 297
|
||||||
Top = 24
|
Top = 23
|
||||||
Width = 22
|
Width = 22
|
||||||
HintFormat = 'Black: %value'
|
HintFormat = 'Black: %value'
|
||||||
Anchors = [akTop, akLeft, akBottom]
|
Anchors = [akTop, akLeft, akBottom]
|
||||||
TabOrder = 8
|
TabOrder = 8
|
||||||
OnChange = CMYKPickerV_Change
|
OnChange = CMYKPickerV_Change
|
||||||
Cyan = 0
|
Cyan = 0
|
||||||
Black = 255
|
Black = 1
|
||||||
SelectedColor = clBlack
|
SelectedColor = 16711422
|
||||||
end
|
end
|
||||||
object YColorPickerV: TYColorPicker
|
object YColorPickerV: TYColorPicker
|
||||||
|
AnchorSideTop.Control = CColorPickerV
|
||||||
Left = 200
|
Left = 200
|
||||||
Height = 296
|
Height = 297
|
||||||
Top = 24
|
Top = 23
|
||||||
Width = 22
|
Width = 22
|
||||||
HintFormat = 'Yellow: %value'
|
HintFormat = 'Yellow: %value'
|
||||||
Anchors = [akTop, akLeft, akBottom]
|
Anchors = [akTop, akLeft, akBottom]
|
||||||
@ -243,9 +252,10 @@ object Form1: TForm1
|
|||||||
SelectedColor = clYellow
|
SelectedColor = clYellow
|
||||||
end
|
end
|
||||||
object MColorPickerV: TMColorPicker
|
object MColorPickerV: TMColorPicker
|
||||||
|
AnchorSideTop.Control = CColorPickerV
|
||||||
Left = 168
|
Left = 168
|
||||||
Height = 296
|
Height = 297
|
||||||
Top = 24
|
Top = 23
|
||||||
Width = 22
|
Width = 22
|
||||||
HintFormat = 'Magenta: %value'
|
HintFormat = 'Magenta: %value'
|
||||||
Anchors = [akTop, akLeft, akBottom]
|
Anchors = [akTop, akLeft, akBottom]
|
||||||
@ -254,9 +264,11 @@ object Form1: TForm1
|
|||||||
SelectedColor = clFuchsia
|
SelectedColor = clFuchsia
|
||||||
end
|
end
|
||||||
object CColorPickerV: TCColorPicker
|
object CColorPickerV: TCColorPicker
|
||||||
|
AnchorSideTop.Control = LblC
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 136
|
Left = 136
|
||||||
Height = 296
|
Height = 297
|
||||||
Top = 24
|
Top = 23
|
||||||
Width = 22
|
Width = 22
|
||||||
HintFormat = 'Cyan: %value'
|
HintFormat = 'Cyan: %value'
|
||||||
Anchors = [akTop, akLeft, akBottom]
|
Anchors = [akTop, akLeft, akBottom]
|
||||||
@ -265,9 +277,11 @@ object Form1: TForm1
|
|||||||
SelectedColor = clAqua
|
SelectedColor = clAqua
|
||||||
end
|
end
|
||||||
object RColorPickerV: TRColorPicker
|
object RColorPickerV: TRColorPicker
|
||||||
|
AnchorSideTop.Control = LblR
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 12
|
Left = 12
|
||||||
Height = 296
|
Height = 297
|
||||||
Top = 24
|
Top = 23
|
||||||
Width = 22
|
Width = 22
|
||||||
HintFormat = 'Red: %value'
|
HintFormat = 'Red: %value'
|
||||||
Anchors = [akTop, akLeft, akBottom]
|
Anchors = [akTop, akLeft, akBottom]
|
||||||
@ -277,9 +291,10 @@ object Form1: TForm1
|
|||||||
Blue = 0
|
Blue = 0
|
||||||
end
|
end
|
||||||
object GColorPickerV: TGColorPicker
|
object GColorPickerV: TGColorPicker
|
||||||
|
AnchorSideTop.Control = RColorPickerV
|
||||||
Left = 45
|
Left = 45
|
||||||
Height = 296
|
Height = 297
|
||||||
Top = 24
|
Top = 23
|
||||||
Width = 22
|
Width = 22
|
||||||
HintFormat = 'Green: %value'
|
HintFormat = 'Green: %value'
|
||||||
Anchors = [akTop, akLeft, akBottom]
|
Anchors = [akTop, akLeft, akBottom]
|
||||||
@ -290,22 +305,24 @@ object Form1: TForm1
|
|||||||
SelectedColor = clLime
|
SelectedColor = clLime
|
||||||
end
|
end
|
||||||
object BColorPickerV: TBColorPicker
|
object BColorPickerV: TBColorPicker
|
||||||
|
AnchorSideTop.Control = RColorPickerV
|
||||||
Left = 76
|
Left = 76
|
||||||
Height = 296
|
Height = 297
|
||||||
Top = 24
|
Top = 23
|
||||||
Width = 22
|
Width = 22
|
||||||
HintFormat = 'Blue: %value'
|
HintFormat = 'Blue: %value'
|
||||||
Anchors = [akTop, akLeft, akBottom]
|
Anchors = [akTop, akLeft, akBottom]
|
||||||
TabOrder = 14
|
TabOrder = 14
|
||||||
OnChange = RGBPickerV_Change
|
OnChange = RGBPickerV_Change
|
||||||
Red = 0
|
|
||||||
Green = 0
|
Green = 0
|
||||||
|
Red = 0
|
||||||
SelectedColor = clBlue
|
SelectedColor = clBlue
|
||||||
end
|
end
|
||||||
object SColorPickerV: TSColorPicker
|
object SColorPickerV: TSColorPicker
|
||||||
|
AnchorSideTop.Control = HColorPickerV
|
||||||
Left = 318
|
Left = 318
|
||||||
Height = 278
|
Height = 279
|
||||||
Top = 24
|
Top = 23
|
||||||
Width = 22
|
Width = 22
|
||||||
HintFormat = 'Saturation: %value'
|
HintFormat = 'Saturation: %value'
|
||||||
Layout = lyVertical
|
Layout = lyVertical
|
||||||
@ -351,10 +368,13 @@ object Form1: TForm1
|
|||||||
Shape = bsTopLine
|
Shape = bsTopLine
|
||||||
end
|
end
|
||||||
object rbHSVh: TRadioButton
|
object rbHSVh: TRadioButton
|
||||||
Left = 72
|
AnchorSideLeft.Control = rbHSLh
|
||||||
|
AnchorSideLeft.Side = asrBottom
|
||||||
|
Left = 71
|
||||||
Height = 19
|
Height = 19
|
||||||
Top = 376
|
Top = 376
|
||||||
Width = 42
|
Width = 42
|
||||||
|
BorderSpacing.Left = 6
|
||||||
Caption = 'HSV'
|
Caption = 'HSV'
|
||||||
OnChange = rbHSLh_Change
|
OnChange = rbHSLh_Change
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
@ -497,9 +517,9 @@ object Form1: TForm1
|
|||||||
TabOrder = 6
|
TabOrder = 6
|
||||||
OnChange = SLVPickerH_Change
|
OnChange = SLVPickerH_Change
|
||||||
Hue = 0
|
Hue = 0
|
||||||
Saturation = 240
|
Saturation = 0
|
||||||
Luminance = 239
|
Luminance = 240
|
||||||
SelectedColor = 16645631
|
SelectedColor = 15790320
|
||||||
end
|
end
|
||||||
object SColorPickerH: TSColorPicker
|
object SColorPickerH: TSColorPicker
|
||||||
Left = 24
|
Left = 24
|
||||||
@ -540,8 +560,8 @@ object Form1: TForm1
|
|||||||
TabOrder = 9
|
TabOrder = 9
|
||||||
OnChange = CMYKPickerH_Change
|
OnChange = CMYKPickerH_Change
|
||||||
Cyan = 0
|
Cyan = 0
|
||||||
Black = 255
|
Black = 1
|
||||||
SelectedColor = clBlack
|
SelectedColor = 16711422
|
||||||
end
|
end
|
||||||
object MColorPickerH: TMColorPicker
|
object MColorPickerH: TMColorPicker
|
||||||
Left = 24
|
Left = 24
|
||||||
@ -589,8 +609,8 @@ object Form1: TForm1
|
|||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
TabOrder = 13
|
TabOrder = 13
|
||||||
OnChange = RGBPickerH_Change
|
OnChange = RGBPickerH_Change
|
||||||
Red = 0
|
|
||||||
Green = 0
|
Green = 0
|
||||||
|
Red = 0
|
||||||
SelectedColor = clBlue
|
SelectedColor = clBlue
|
||||||
end
|
end
|
||||||
object GColorPickerH: TGColorPicker
|
object GColorPickerH: TGColorPicker
|
||||||
|
@ -29,7 +29,7 @@ type
|
|||||||
HColorPickerV: THColorPicker;
|
HColorPickerV: THColorPicker;
|
||||||
KColorPickerH: TKColorPicker;
|
KColorPickerH: TKColorPicker;
|
||||||
KColorPickerV: TKColorPicker;
|
KColorPickerV: TKColorPicker;
|
||||||
Label1: TLabel;
|
LblR: TLabel;
|
||||||
lblLVv: TLabel;
|
lblLVv: TLabel;
|
||||||
Label12: TLabel;
|
Label12: TLabel;
|
||||||
Label13: TLabel;
|
Label13: TLabel;
|
||||||
@ -43,11 +43,11 @@ type
|
|||||||
Label20: TLabel;
|
Label20: TLabel;
|
||||||
lblLVh: TLabel;
|
lblLVh: TLabel;
|
||||||
Label3: TLabel;
|
Label3: TLabel;
|
||||||
Label4: TLabel;
|
LblC: TLabel;
|
||||||
Label5: TLabel;
|
Label5: TLabel;
|
||||||
Label6: TLabel;
|
Label6: TLabel;
|
||||||
Label7: TLabel;
|
Label7: TLabel;
|
||||||
Label8: TLabel;
|
LblH: TLabel;
|
||||||
Label9: TLabel;
|
Label9: TLabel;
|
||||||
LColorPickerH: TLColorPicker;
|
LColorPickerH: TLColorPicker;
|
||||||
LColorPickerV: TLColorPicker;
|
LColorPickerV: TLColorPicker;
|
||||||
@ -317,7 +317,11 @@ begin
|
|||||||
if rbHSVv.Checked then begin
|
if rbHSVv.Checked then begin
|
||||||
if (VColorPickerV = nil) then
|
if (VColorPickerV = nil) then
|
||||||
exit;
|
exit;
|
||||||
HSLVv.Color := HSVtoColor(HColorPickerV.Hue, SColorPickerV.Saturation, VColorPickerV.Value);
|
HSLVv.Color := HSVtoColor(
|
||||||
|
HColorPickerV.Hue/HColorPickerV.MaxHue,
|
||||||
|
SColorPickerV.Saturation/SColorPickerV.MaxSaturation,
|
||||||
|
VColorPickerV.Value/VColorPickerV.MaxValue
|
||||||
|
);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
c := HSLVv.Color;
|
c := HSLVv.Color;
|
||||||
|
Reference in New Issue
Block a user