You've already forked lazarus-ccr
mbColorLib: Add HSLRingPicker and RGBColorPickers to OfficeMoreColorsDialog, fix hints in OfficeMoreColorsDialog
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5476 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -33,8 +33,6 @@ type
|
|||||||
FHSCursor, FLCursor: TCursor;
|
FHSCursor, FLCursor: TCursor;
|
||||||
PBack: TBitmap;
|
PBack: TBitmap;
|
||||||
function GetManual: boolean;
|
function GetManual: boolean;
|
||||||
function GetShowHint: Boolean;
|
|
||||||
procedure SetShowHint(AValue: Boolean);
|
|
||||||
procedure SetLumIncrement(i: integer);
|
procedure SetLumIncrement(i: integer);
|
||||||
procedure SelectColor(c: TColor);
|
procedure SelectColor(c: TColor);
|
||||||
procedure SetH(v: integer);
|
procedure SetH(v: integer);
|
||||||
@ -52,15 +50,15 @@ type
|
|||||||
procedure SetSelectedColor(Value: TColor);
|
procedure SetSelectedColor(Value: TColor);
|
||||||
protected
|
protected
|
||||||
procedure CreateWnd; override;
|
procedure CreateWnd; override;
|
||||||
|
procedure DoChange;
|
||||||
|
procedure DoMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
|
||||||
procedure Resize; override;
|
procedure Resize; override;
|
||||||
procedure Paint; override;
|
procedure Paint; override;
|
||||||
// procedure PaintParentBack; override;
|
// procedure PaintParentBack; override;
|
||||||
procedure WMSetFocus(var Message: {$IFDEF FPC}TLMSetFocus{$ELSE}TWMSetFocus{$ENDIF});
|
procedure WMSetFocus(var Message: {$IFDEF FPC}TLMSetFocus{$ELSE}TWMSetFocus{$ENDIF});
|
||||||
message {$IFDEF FPC}LM_SETFOCUS{$ELSE}WM_SETFOCUS{$ENDIF};
|
message {$IFDEF FPC}LM_SETFOCUS{$ELSE}WM_SETFOCUS{$ENDIF};
|
||||||
procedure DoMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
|
|
||||||
procedure HSPickerChange(Sender: TObject);
|
procedure HSPickerChange(Sender: TObject);
|
||||||
procedure LPickerChange(Sender: TObject);
|
procedure LPickerChange(Sender: TObject);
|
||||||
procedure DoChange;
|
|
||||||
public
|
public
|
||||||
constructor Create(AOwner: TComponent); override;
|
constructor Create(AOwner: TComponent); override;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
@ -85,7 +83,7 @@ type
|
|||||||
property HSPickerCursor: TCursor read FHSCursor write SetHSCursor default crDefault;
|
property HSPickerCursor: TCursor read FHSCursor write SetHSCursor default crDefault;
|
||||||
property LPickerCursor: TCursor read FLCursor write SetLCursor default crDefault;
|
property LPickerCursor: TCursor read FLCursor write SetLCursor default crDefault;
|
||||||
property TabStop default true;
|
property TabStop default true;
|
||||||
property ShowHint read GetShowHint write SetShowHint;
|
property ShowHint;
|
||||||
property ParentShowHint;
|
property ParentShowHint;
|
||||||
property Anchors;
|
property Anchors;
|
||||||
property Align;
|
property Align;
|
||||||
@ -326,18 +324,6 @@ begin
|
|||||||
Result := FHSPicker.Manual or FLPicker.Manual;
|
Result := FHSPicker.Manual or FLPicker.Manual;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function THSLColorPicker.GetShowHint: Boolean;
|
|
||||||
begin
|
|
||||||
Result := inherited ShowHint;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure THSLColorPicker.SetShowHint(AValue: Boolean);
|
|
||||||
begin
|
|
||||||
inherited ShowHint := AValue;
|
|
||||||
FHSPicker.ShowHint := AValue;
|
|
||||||
FLPicker.ShowHint := AValue;
|
|
||||||
end;
|
|
||||||
|
|
||||||
(*
|
(*
|
||||||
procedure THSLColorPicker.PaintParentBack;
|
procedure THSLColorPicker.PaintParentBack;
|
||||||
begin
|
begin
|
||||||
@ -361,7 +347,6 @@ end;
|
|||||||
procedure THSLColorPicker.Resize;
|
procedure THSLColorPicker.Resize;
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
// PaintParentBack(Canvas);
|
|
||||||
|
|
||||||
if (FHSPicker = nil) or (FLPicker = nil) then
|
if (FHSPicker = nil) or (FLPicker = nil) then
|
||||||
exit;
|
exit;
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
object OfficeMoreColorsWin: TOfficeMoreColorsWin
|
object OfficeMoreColorsWin: TOfficeMoreColorsWin
|
||||||
Left = 265
|
Left = 265
|
||||||
Height = 300
|
Height = 310
|
||||||
Top = 115
|
Top = 115
|
||||||
Width = 331
|
Width = 343
|
||||||
ActiveControl = OKbtn
|
ActiveControl = OKbtn
|
||||||
BorderIcons = [biSystemMenu]
|
BorderIcons = [biSystemMenu]
|
||||||
Caption = 'More colors...'
|
Caption = 'More colors...'
|
||||||
ClientHeight = 300
|
ClientHeight = 310
|
||||||
ClientWidth = 331
|
ClientWidth = 343
|
||||||
Constraints.MinHeight = 300
|
Constraints.MinHeight = 310
|
||||||
Constraints.MinWidth = 331
|
Constraints.MinWidth = 340
|
||||||
Font.Color = clWindowText
|
Font.Color = clWindowText
|
||||||
Font.Height = -11
|
Font.Height = -11
|
||||||
Font.Name = 'MS Shell Dlg 2'
|
Font.Name = 'MS Shell Dlg 2'
|
||||||
@ -19,7 +19,7 @@ object OfficeMoreColorsWin: TOfficeMoreColorsWin
|
|||||||
Position = poMainFormCenter
|
Position = poMainFormCenter
|
||||||
LCLVersion = '1.7'
|
LCLVersion = '1.7'
|
||||||
object Label4: TLabel
|
object Label4: TLabel
|
||||||
Left = 264
|
Left = 276
|
||||||
Height = 13
|
Height = 13
|
||||||
Top = 72
|
Top = 72
|
||||||
Width = 21
|
Width = 21
|
||||||
@ -28,7 +28,7 @@ object OfficeMoreColorsWin: TOfficeMoreColorsWin
|
|||||||
ParentColor = False
|
ParentColor = False
|
||||||
end
|
end
|
||||||
object Label5: TLabel
|
object Label5: TLabel
|
||||||
Left = 256
|
Left = 268
|
||||||
Height = 13
|
Height = 13
|
||||||
Top = 160
|
Top = 160
|
||||||
Width = 37
|
Width = 37
|
||||||
@ -38,9 +38,9 @@ object OfficeMoreColorsWin: TOfficeMoreColorsWin
|
|||||||
end
|
end
|
||||||
object Pages: TPageControl
|
object Pages: TPageControl
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 280
|
Height = 290
|
||||||
Top = 6
|
Top = 6
|
||||||
Width = 227
|
Width = 239
|
||||||
ActivePage = Custom
|
ActivePage = Custom
|
||||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||||
TabIndex = 1
|
TabIndex = 1
|
||||||
@ -48,8 +48,8 @@ object OfficeMoreColorsWin: TOfficeMoreColorsWin
|
|||||||
OnChange = PagesChange
|
OnChange = PagesChange
|
||||||
object Standard: TTabSheet
|
object Standard: TTabSheet
|
||||||
Caption = 'Standard'
|
Caption = 'Standard'
|
||||||
ClientHeight = 254
|
ClientHeight = 264
|
||||||
ClientWidth = 219
|
ClientWidth = 231
|
||||||
object Label2: TLabel
|
object Label2: TLabel
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 13
|
Height = 13
|
||||||
@ -61,9 +61,9 @@ object OfficeMoreColorsWin: TOfficeMoreColorsWin
|
|||||||
end
|
end
|
||||||
object Hexa: THexaColorPicker
|
object Hexa: THexaColorPicker
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 227
|
Height = 237
|
||||||
Top = 26
|
Top = 26
|
||||||
Width = 216
|
Width = 228
|
||||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||||
HintFormat = 'RGB(%r, %g, %b)'#13'Hex: %h'
|
HintFormat = 'RGB(%r, %g, %b)'#13'Hex: %h'
|
||||||
IntensityText = 'Intensity'
|
IntensityText = 'Intensity'
|
||||||
@ -75,8 +75,8 @@ object OfficeMoreColorsWin: TOfficeMoreColorsWin
|
|||||||
end
|
end
|
||||||
object Custom: TTabSheet
|
object Custom: TTabSheet
|
||||||
Caption = 'Custom'
|
Caption = 'Custom'
|
||||||
ClientHeight = 254
|
ClientHeight = 264
|
||||||
ClientWidth = 219
|
ClientWidth = 231
|
||||||
ImageIndex = 1
|
ImageIndex = 1
|
||||||
object Label1: TLabel
|
object Label1: TLabel
|
||||||
Left = 6
|
Left = 6
|
||||||
@ -90,17 +90,17 @@ object OfficeMoreColorsWin: TOfficeMoreColorsWin
|
|||||||
object Label3: TLabel
|
object Label3: TLabel
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 13
|
Height = 13
|
||||||
Top = 150
|
Top = 160
|
||||||
Width = 32
|
Width = 32
|
||||||
Anchors = [akLeft, akBottom]
|
Anchors = [akLeft, akBottom]
|
||||||
Caption = 'Mo&del:'
|
Caption = '&Picker:'
|
||||||
FocusControl = ColorModel
|
FocusControl = cbColorDisplay
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
end
|
end
|
||||||
object LRed: TLabel
|
object LRed: TLabel
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 13
|
Height = 13
|
||||||
Top = 176
|
Top = 186
|
||||||
Width = 23
|
Width = 23
|
||||||
Anchors = [akLeft, akBottom]
|
Anchors = [akLeft, akBottom]
|
||||||
Caption = '&Red:'
|
Caption = '&Red:'
|
||||||
@ -109,7 +109,7 @@ object OfficeMoreColorsWin: TOfficeMoreColorsWin
|
|||||||
object LGreen: TLabel
|
object LGreen: TLabel
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 13
|
Height = 13
|
||||||
Top = 202
|
Top = 212
|
||||||
Width = 33
|
Width = 33
|
||||||
Anchors = [akLeft, akBottom]
|
Anchors = [akLeft, akBottom]
|
||||||
Caption = '&Green:'
|
Caption = '&Green:'
|
||||||
@ -118,55 +118,35 @@ object OfficeMoreColorsWin: TOfficeMoreColorsWin
|
|||||||
object LBlue: TLabel
|
object LBlue: TLabel
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 13
|
Height = 13
|
||||||
Top = 228
|
Top = 238
|
||||||
Width = 24
|
Width = 24
|
||||||
Anchors = [akLeft, akBottom]
|
Anchors = [akLeft, akBottom]
|
||||||
Caption = '&Blue:'
|
Caption = '&Blue:'
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
end
|
end
|
||||||
object HSL: THSLColorPicker
|
object cbColorDisplay: TComboBox
|
||||||
Left = 6
|
|
||||||
Height = 124
|
|
||||||
Top = 20
|
|
||||||
Width = 210
|
|
||||||
HSPickerHintFormat = 'H: %h S: %s'#13'Hex: %hex'
|
|
||||||
LPickerHintFormat = 'Luminance: %l'
|
|
||||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
|
||||||
TabOrder = 0
|
|
||||||
OnChange = HSLChange
|
|
||||||
end
|
|
||||||
object ColorModel: TComboBox
|
|
||||||
Left = 48
|
Left = 48
|
||||||
Height = 21
|
Height = 21
|
||||||
Top = 146
|
Top = 156
|
||||||
Width = 147
|
Width = 147
|
||||||
Anchors = [akLeft, akBottom]
|
Anchors = [akLeft, akBottom]
|
||||||
ItemHeight = 13
|
ItemHeight = 13
|
||||||
ItemIndex = 0
|
ItemIndex = 0
|
||||||
Items.Strings = (
|
Items.Strings = (
|
||||||
'RGB'
|
'HS box, L bar'
|
||||||
'HSL'
|
'H ring, SL box'
|
||||||
|
'SL box, H bar'
|
||||||
|
'RGB trackbars'
|
||||||
)
|
)
|
||||||
OnChange = ColorModelChange
|
OnChange = cbColorDisplayChange
|
||||||
Style = csDropDownList
|
Style = csDropDownList
|
||||||
TabOrder = 1
|
TabOrder = 0
|
||||||
Text = 'RGB'
|
Text = 'HS box, L bar'
|
||||||
end
|
|
||||||
object SLH: TSLHColorPicker
|
|
||||||
Left = 6
|
|
||||||
Height = 80
|
|
||||||
Top = 20
|
|
||||||
Width = 115
|
|
||||||
HPickerHintFormat = 'Hue: %h'
|
|
||||||
SLPickerHintFormat = 'S: %hslS L: %l'#13'Hex: %hex'
|
|
||||||
ParentShowHint = False
|
|
||||||
TabOrder = 2
|
|
||||||
OnChange = SLHChange
|
|
||||||
end
|
end
|
||||||
object LHue: TLabel
|
object LHue: TLabel
|
||||||
Left = 120
|
Left = 120
|
||||||
Height = 13
|
Height = 13
|
||||||
Top = 176
|
Top = 186
|
||||||
Width = 23
|
Width = 23
|
||||||
Anchors = [akLeft, akBottom]
|
Anchors = [akLeft, akBottom]
|
||||||
Caption = '&Hue:'
|
Caption = '&Hue:'
|
||||||
@ -175,7 +155,7 @@ object OfficeMoreColorsWin: TOfficeMoreColorsWin
|
|||||||
object LSat: TLabel
|
object LSat: TLabel
|
||||||
Left = 120
|
Left = 120
|
||||||
Height = 13
|
Height = 13
|
||||||
Top = 202
|
Top = 212
|
||||||
Width = 20
|
Width = 20
|
||||||
Anchors = [akLeft, akBottom]
|
Anchors = [akLeft, akBottom]
|
||||||
Caption = '&Sat:'
|
Caption = '&Sat:'
|
||||||
@ -184,16 +164,166 @@ object OfficeMoreColorsWin: TOfficeMoreColorsWin
|
|||||||
object LLum: TLabel
|
object LLum: TLabel
|
||||||
Left = 120
|
Left = 120
|
||||||
Height = 13
|
Height = 13
|
||||||
Top = 228
|
Top = 238
|
||||||
Width = 23
|
Width = 23
|
||||||
Anchors = [akLeft, akBottom]
|
Anchors = [akLeft, akBottom]
|
||||||
Caption = 'L&um:'
|
Caption = 'L&um:'
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
end
|
end
|
||||||
|
object PickerNotebook: TNotebook
|
||||||
|
Left = 6
|
||||||
|
Height = 132
|
||||||
|
Top = 22
|
||||||
|
Width = 220
|
||||||
|
PageIndex = 3
|
||||||
|
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||||
|
TabOrder = 1
|
||||||
|
object nbHSL: TPage
|
||||||
|
object HSL: THSLColorPicker
|
||||||
|
Left = 0
|
||||||
|
Height = 132
|
||||||
|
Top = 0
|
||||||
|
Width = 220
|
||||||
|
HSPickerHintFormat = 'H: %h S: %s'#13'Hex: %hex'
|
||||||
|
LPickerHintFormat = 'Luminance: %l'
|
||||||
|
Align = alClient
|
||||||
|
TabOrder = 0
|
||||||
|
OnChange = ColorPickerChange
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object nbHSLRing: TPage
|
||||||
|
object HSLRing: THSLRingPicker
|
||||||
|
AnchorSideLeft.Control = nbHSLRing
|
||||||
|
AnchorSideLeft.Side = asrCenter
|
||||||
|
Left = 42
|
||||||
|
Height = 124
|
||||||
|
Top = 0
|
||||||
|
Width = 136
|
||||||
|
RingPickerHintFormat = 'Hue: %h'
|
||||||
|
SLPickerHintFormat = 'S: %hslS L: %l'#13'Hex: %hex'
|
||||||
|
ParentShowHint = False
|
||||||
|
Anchors = [akTop, akLeft, akBottom]
|
||||||
|
TabOrder = 0
|
||||||
|
OnChange = ColorPickerChange
|
||||||
|
end
|
||||||
|
object Bevel1: TBevel
|
||||||
|
Left = 0
|
||||||
|
Height = 5
|
||||||
|
Top = 127
|
||||||
|
Width = 220
|
||||||
|
Align = alBottom
|
||||||
|
Shape = bsSpacer
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object nbSLH: TPage
|
||||||
|
object SLH: TSLHColorPicker
|
||||||
|
Left = 0
|
||||||
|
Height = 122
|
||||||
|
Top = 0
|
||||||
|
Width = 238
|
||||||
|
HPickerHintFormat = 'Hue: %h'
|
||||||
|
SLPickerHintFormat = 'S: %hslS L: %l'#13'Hex: %hex'
|
||||||
|
ParentShowHint = False
|
||||||
|
Align = alClient
|
||||||
|
TabOrder = 0
|
||||||
|
OnChange = ColorPickerChange
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object nbRGB: TPage
|
||||||
|
object RTrackbar: TRColorPicker
|
||||||
|
AnchorSideRight.Control = nbRGB
|
||||||
|
AnchorSideRight.Side = asrBottom
|
||||||
|
Left = 14
|
||||||
|
Height = 32
|
||||||
|
Top = 0
|
||||||
|
Width = 206
|
||||||
|
HintFormat = 'Red: %value (selected)'
|
||||||
|
Layout = lyHorizontal
|
||||||
|
SelectionIndicator = siRect
|
||||||
|
Anchors = [akTop, akLeft, akRight]
|
||||||
|
TabOrder = 0
|
||||||
|
OnChange = ColorPickerChange
|
||||||
|
SelectedColor = 8026879
|
||||||
|
end
|
||||||
|
object GTrackbar: TGColorPicker
|
||||||
|
AnchorSideRight.Control = nbRGB
|
||||||
|
AnchorSideRight.Side = asrBottom
|
||||||
|
Left = 16
|
||||||
|
Height = 32
|
||||||
|
Top = 40
|
||||||
|
Width = 204
|
||||||
|
BevelInner = bvLowered
|
||||||
|
BevelOuter = bvRaised
|
||||||
|
HintFormat = 'Green: %value (selected)'
|
||||||
|
Layout = lyHorizontal
|
||||||
|
SelectionIndicator = siRect
|
||||||
|
Anchors = [akTop, akLeft, akRight]
|
||||||
|
TabOrder = 1
|
||||||
|
OnChange = ColorPickerChange
|
||||||
|
SelectedColor = 8060794
|
||||||
|
end
|
||||||
|
object BTrackbar: TBColorPicker
|
||||||
|
AnchorSideRight.Control = nbRGB
|
||||||
|
AnchorSideRight.Side = asrBottom
|
||||||
|
Left = 16
|
||||||
|
Height = 32
|
||||||
|
Top = 80
|
||||||
|
Width = 204
|
||||||
|
HintFormat = 'Blue: %value (selected)'
|
||||||
|
Layout = lyHorizontal
|
||||||
|
SelectionIndicator = siRect
|
||||||
|
Anchors = [akTop, akLeft, akRight]
|
||||||
|
TabOrder = 2
|
||||||
|
OnChange = ColorPickerChange
|
||||||
|
SelectedColor = 16743034
|
||||||
|
end
|
||||||
|
object Label6: TLabel
|
||||||
|
AnchorSideTop.Control = RTrackbar
|
||||||
|
AnchorSideTop.Side = asrCenter
|
||||||
|
AnchorSideRight.Control = RTrackbar
|
||||||
|
Left = 4
|
||||||
|
Height = 13
|
||||||
|
Top = 10
|
||||||
|
Width = 7
|
||||||
|
Anchors = [akTop, akRight]
|
||||||
|
BorderSpacing.Right = 3
|
||||||
|
Caption = 'R'
|
||||||
|
ParentColor = False
|
||||||
|
end
|
||||||
|
object Label7: TLabel
|
||||||
|
AnchorSideTop.Control = GTrackbar
|
||||||
|
AnchorSideTop.Side = asrCenter
|
||||||
|
AnchorSideRight.Control = GTrackbar
|
||||||
|
Left = 4
|
||||||
|
Height = 13
|
||||||
|
Top = 50
|
||||||
|
Width = 7
|
||||||
|
Anchors = [akTop, akRight]
|
||||||
|
BorderSpacing.Left = 4
|
||||||
|
BorderSpacing.Right = 5
|
||||||
|
Caption = 'G'
|
||||||
|
ParentColor = False
|
||||||
|
end
|
||||||
|
object Label8: TLabel
|
||||||
|
AnchorSideTop.Control = BTrackbar
|
||||||
|
AnchorSideTop.Side = asrCenter
|
||||||
|
AnchorSideRight.Control = BTrackbar
|
||||||
|
Left = 5
|
||||||
|
Height = 13
|
||||||
|
Top = 90
|
||||||
|
Width = 6
|
||||||
|
Anchors = [akTop, akRight]
|
||||||
|
BorderSpacing.Left = 4
|
||||||
|
BorderSpacing.Right = 5
|
||||||
|
Caption = 'B'
|
||||||
|
ParentColor = False
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object OKbtn: TButton
|
object OKbtn: TButton
|
||||||
Left = 242
|
Left = 254
|
||||||
Height = 23
|
Height = 23
|
||||||
Top = 6
|
Top = 6
|
||||||
Width = 73
|
Width = 73
|
||||||
@ -203,7 +333,7 @@ object OfficeMoreColorsWin: TOfficeMoreColorsWin
|
|||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
end
|
end
|
||||||
object Cancelbtn: TButton
|
object Cancelbtn: TButton
|
||||||
Left = 242
|
Left = 254
|
||||||
Height = 23
|
Height = 23
|
||||||
Top = 36
|
Top = 36
|
||||||
Width = 73
|
Width = 73
|
||||||
@ -214,7 +344,7 @@ object OfficeMoreColorsWin: TOfficeMoreColorsWin
|
|||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
end
|
end
|
||||||
object NewSwatch: TmbColorPreview
|
object NewSwatch: TmbColorPreview
|
||||||
Left = 242
|
Left = 254
|
||||||
Height = 32
|
Height = 32
|
||||||
Hint = 'RGB(255, 255, 255)'
|
Hint = 'RGB(255, 255, 255)'
|
||||||
Top = 92
|
Top = 92
|
||||||
@ -225,7 +355,7 @@ object OfficeMoreColorsWin: TOfficeMoreColorsWin
|
|||||||
OnColorChange = NewSwatchColorChange
|
OnColorChange = NewSwatchColorChange
|
||||||
end
|
end
|
||||||
object OldSwatch: TmbColorPreview
|
object OldSwatch: TmbColorPreview
|
||||||
Left = 242
|
Left = 254
|
||||||
Height = 32
|
Height = 32
|
||||||
Hint = 'RGB(255, 255, 255)'#13#10'Hex: FFFFFF'
|
Hint = 'RGB(255, 255, 255)'#13#10'Hex: FFFFFF'
|
||||||
Top = 123
|
Top = 123
|
||||||
|
@ -14,17 +14,31 @@ uses
|
|||||||
Forms, StdCtrls, ExtCtrls, ComCtrls,
|
Forms, StdCtrls, ExtCtrls, ComCtrls,
|
||||||
HexaColorPicker, HSLColorPicker, RGBHSLUtils,
|
HexaColorPicker, HSLColorPicker, RGBHSLUtils,
|
||||||
mbColorPreview, {$IFDEF mbXP_Lib}mbXPSpinEdit, mbXPSizeGrip,{$ELSE} Spin,{$ENDIF}
|
mbColorPreview, {$IFDEF mbXP_Lib}mbXPSpinEdit, mbXPSizeGrip,{$ELSE} Spin,{$ENDIF}
|
||||||
HTMLColors, SLHColorPicker;
|
HTMLColors, SLHColorPicker, HSLRingPicker, RColorPicker, GColorPicker,
|
||||||
|
BColorPicker;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
{ TOfficeMoreColorsWin }
|
{ TOfficeMoreColorsWin }
|
||||||
|
|
||||||
TOfficeMoreColorsWin = class(TForm)
|
TOfficeMoreColorsWin = class(TForm)
|
||||||
|
BTrackbar: TBColorPicker;
|
||||||
|
Bevel1: TBevel;
|
||||||
|
GTrackbar: TGColorPicker;
|
||||||
|
HSLRing: THSLRingPicker;
|
||||||
|
Label6: TLabel;
|
||||||
|
Label7: TLabel;
|
||||||
|
Label8: TLabel;
|
||||||
LLum: TLabel;
|
LLum: TLabel;
|
||||||
LSat: TLabel;
|
LSat: TLabel;
|
||||||
LHue: TLabel;
|
LHue: TLabel;
|
||||||
|
nbRGB: TPage;
|
||||||
|
PickerNotebook: TNotebook;
|
||||||
|
nbHSL: TPage;
|
||||||
|
nbHSLRing: TPage;
|
||||||
|
nbSLH: TPage;
|
||||||
Pages: TPageControl;
|
Pages: TPageControl;
|
||||||
|
RTrackbar: TRColorPicker;
|
||||||
SLH: TSLHColorPicker;
|
SLH: TSLHColorPicker;
|
||||||
Standard: TTabSheet;
|
Standard: TTabSheet;
|
||||||
Custom: TTabSheet;
|
Custom: TTabSheet;
|
||||||
@ -33,7 +47,7 @@ type
|
|||||||
Label1: TLabel;
|
Label1: TLabel;
|
||||||
Label2: TLabel;
|
Label2: TLabel;
|
||||||
Label3: TLabel;
|
Label3: TLabel;
|
||||||
ColorModel: TComboBox;
|
cbColorDisplay: TComboBox;
|
||||||
LRed: TLabel;
|
LRed: TLabel;
|
||||||
LGreen: TLabel;
|
LGreen: TLabel;
|
||||||
LBlue: TLabel;
|
LBlue: TLabel;
|
||||||
@ -43,7 +57,7 @@ type
|
|||||||
Cancelbtn: TButton;
|
Cancelbtn: TButton;
|
||||||
NewSwatch: TmbColorPreview;
|
NewSwatch: TmbColorPreview;
|
||||||
OldSwatch: TmbColorPreview;
|
OldSwatch: TmbColorPreview;
|
||||||
procedure ColorModelChange(Sender: TObject);
|
procedure cbColorDisplayChange(Sender: TObject);
|
||||||
procedure HSLChange(Sender: TObject);
|
procedure HSLChange(Sender: TObject);
|
||||||
procedure ERedChange(Sender: TObject);
|
procedure ERedChange(Sender: TObject);
|
||||||
procedure EGreenChange(Sender: TObject);
|
procedure EGreenChange(Sender: TObject);
|
||||||
@ -56,10 +70,11 @@ type
|
|||||||
procedure FormResize(Sender: TObject);
|
procedure FormResize(Sender: TObject);
|
||||||
function GetHint(c: TColor): string;
|
function GetHint(c: TColor): string;
|
||||||
procedure HexaChange(Sender: TObject);
|
procedure HexaChange(Sender: TObject);
|
||||||
|
procedure HSLRingChange(Sender: TObject);
|
||||||
procedure NewSwatchColorChange(Sender: TObject);
|
procedure NewSwatchColorChange(Sender: TObject);
|
||||||
procedure OldSwatchColorChange(Sender: TObject);
|
procedure OldSwatchColorChange(Sender: TObject);
|
||||||
procedure PagesChange(Sender: TObject);
|
procedure PagesChange(Sender: TObject);
|
||||||
procedure SetAllToSel(c: TColor);
|
procedure ColorPickerChange(Sender: TObject);
|
||||||
procedure SLHChange(Sender: TObject);
|
procedure SLHChange(Sender: TObject);
|
||||||
private
|
private
|
||||||
{$IFDEF mbXP_Lib}
|
{$IFDEF mbXP_Lib}
|
||||||
@ -71,9 +86,15 @@ type
|
|||||||
EHue, ESat, ELum: TSpinEdit;
|
EHue, ESat, ELum: TSpinEdit;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
FLockChange: Integer;
|
FLockChange: Integer;
|
||||||
|
function GetShowHint: Boolean;
|
||||||
|
procedure SetAllCustom(c: TColor);
|
||||||
|
procedure SetAllToSel(c: TColor);
|
||||||
|
procedure SetShowHint(AValue: boolean);
|
||||||
protected
|
protected
|
||||||
procedure CreateParams(var Params: TCreateParams); override;
|
procedure CreateParams(var Params: TCreateParams); override;
|
||||||
procedure CreateWnd; override;
|
// procedure CreateWnd; override;
|
||||||
|
published
|
||||||
|
property ShowHint: Boolean read GetShowHint write SetShowHint;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
var
|
var
|
||||||
@ -87,31 +108,77 @@ implementation
|
|||||||
{$R *.lfm}
|
{$R *.lfm}
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
|
procedure TOfficeMoreColorsWin.ColorPickerChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if FLockChange <> 0 then
|
||||||
|
exit;
|
||||||
|
if Sender = HSL then
|
||||||
|
SetAllCustom(HSL.SelectedColor);
|
||||||
|
if Sender = HSLRing then
|
||||||
|
SetAllCustom(HSLRing.SelectedColor);
|
||||||
|
if Sender = SLH then
|
||||||
|
SetAllCustom(SLH.SelectedColor);
|
||||||
|
if Sender = RTrackbar then
|
||||||
|
SetAllCustom(RTrackbar.SelectedColor);
|
||||||
|
if Sender = GTrackbar then
|
||||||
|
SetAllCustom(GTrackbar.SelectedColor);
|
||||||
|
if Sender = BTrackbar then
|
||||||
|
SetAllCustom(BTrackbar.SelectedColor);
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TOfficeMoreColorsWin.CreateParams(var Params: TCreateParams);
|
procedure TOfficeMoreColorsWin.CreateParams(var Params: TCreateParams);
|
||||||
begin
|
begin
|
||||||
inherited CreateParams(Params);
|
inherited CreateParams(Params);
|
||||||
Params.Style := WS_CAPTION or WS_SIZEBOX or WS_SYSMENU;
|
Params.Style := WS_CAPTION or WS_SIZEBOX or WS_SYSMENU;
|
||||||
Params.ExStyle := WS_EX_DLGMODALFRAME or WS_EX_WINDOWEDGE;
|
Params.ExStyle := WS_EX_DLGMODALFRAME or WS_EX_WINDOWEDGE;
|
||||||
end;
|
end;
|
||||||
|
(*
|
||||||
procedure TOfficeMoreColorsWin.CreateWnd;
|
procedure TOfficeMoreColorsWin.CreateWnd;
|
||||||
begin
|
begin
|
||||||
inherited CreateWnd;
|
inherited CreateWnd;
|
||||||
{ wp : LM_SETICON not used in LCL }
|
{ wp : LM_SETICON not used in LCL }
|
||||||
// SendMessage(Self.Handle, {$IFDEF FPC}LM_SETICON{$ELSE}WM_SETICON{$ENDIF}, 1, 0);
|
// SendMessage(Self.Handle, {$IFDEF FPC}LM_SETICON{$ELSE}WM_SETICON{$ENDIF}, 1, 0);
|
||||||
end;
|
end;
|
||||||
|
*)
|
||||||
procedure TOfficeMoreColorsWin.ColorModelChange(Sender: TObject);
|
procedure TOfficeMoreColorsWin.cbColorDisplayChange(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
HSL.Visible := ColorModel.ItemIndex = 0;
|
PickerNotebook.PageIndex := cbColorDisplay.ItemIndex;
|
||||||
SLH.Visible := ColorModel.ItemIndex = 1;
|
SetAllCustom(NewSwatch.Color);
|
||||||
HSL.SelectedColor := NewSwatch.Color;
|
exit;
|
||||||
SLH.SelectedColor := NewSwatch.Color;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
{
|
||||||
|
HSL.Visible := cbColorDisplay.ItemIndex = 0;
|
||||||
|
HSLRing.Visible := cbColorDisplay.ItemIndex = 1;
|
||||||
|
SLH.Visible := cbColorDisplay.ItemIndex = 2;
|
||||||
|
}
|
||||||
|
if HSL.Visible then
|
||||||
|
HSL.SelectedColor := NewSwatch.Color;
|
||||||
|
if HSLRing.Visible then
|
||||||
|
HSLRing.SelectedColor := NewSwatch.Color;
|
||||||
|
if SLH.Visible then
|
||||||
|
SLH.SelectedColor := NewSwatch.Color;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TOfficeMoreColorsWin.GetShowHint: Boolean;
|
||||||
|
begin
|
||||||
|
Result := inherited ShowHint;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TOfficeMoreColorsWin.HSLChange(Sender: TObject);
|
procedure TOfficeMoreColorsWin.HSLChange(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
NewSwatch.Color := HSL.SelectedColor;
|
if FLockChange <> 0 then
|
||||||
|
exit;
|
||||||
|
SetAllCustom(HSL.SelectedColor);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TOfficeMoreColorsWin.HSLRingChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if FLockChange <> 0 then
|
||||||
|
exit;
|
||||||
|
SetAllCustom(HSLRing.SelectedColor);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TOfficeMoreColorsWin.ERedChange(Sender: TObject);
|
procedure TOfficeMoreColorsWin.ERedChange(Sender: TObject);
|
||||||
@ -223,12 +290,23 @@ begin
|
|||||||
then
|
then
|
||||||
exit;
|
exit;
|
||||||
|
|
||||||
|
SetAllCustom(NewSwatch.Color);
|
||||||
|
{
|
||||||
|
|
||||||
ERed.Value := GetRValue(NewSwatch.Color);
|
ERed.Value := GetRValue(NewSwatch.Color);
|
||||||
EGreen.Value := GetGValue(NewSwatch.Color);
|
EGreen.Value := GetGValue(NewSwatch.Color);
|
||||||
EBlue.Value := GetBValue(NewSwatch.Color);
|
EBlue.Value := GetBValue(NewSwatch.Color);
|
||||||
EHue.Value := GetHValue(NewSwatch.Color);
|
EHue.Value := GetHValue(NewSwatch.Color);
|
||||||
ESat.Value := GetSValue(NewSwatch.Color);
|
ESat.Value := GetSValue(NewSwatch.Color);
|
||||||
ELum.Value := GetLValue(NewSwatch.Color);
|
ELum.Value := GetLValue(NewSwatch.Color);
|
||||||
|
|
||||||
|
if HSL.Visible then
|
||||||
|
HSL.SelectedColor := NewSwatch.Color;
|
||||||
|
if HSLRing.Visible then
|
||||||
|
HSLRing.SelectedColor := NewSwatch.Color;
|
||||||
|
if SLH.Visible then
|
||||||
|
SLH.SelectedColor := NewSwatch.Color;
|
||||||
|
}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TOfficeMoreColorsWin.OldSwatchColorChange(Sender: TObject);
|
procedure TOfficeMoreColorsWin.OldSwatchColorChange(Sender: TObject);
|
||||||
@ -245,24 +323,73 @@ begin
|
|||||||
// Standard Page
|
// Standard Page
|
||||||
0: Hexa.SelectedColor := c;
|
0: Hexa.SelectedColor := c;
|
||||||
// Custom Page
|
// Custom Page
|
||||||
1: begin
|
1: SetAllCustom(c);
|
||||||
HSL.SelectedColor := c;
|
|
||||||
SLH.SelectedColor := c;
|
|
||||||
ERed.Value := GetRValue(c);
|
|
||||||
EGreen.Value := GetGValue(c);
|
|
||||||
EBlue.Value := GetBValue(c);
|
|
||||||
RGBtoHSLRange(c, h, s, l);
|
|
||||||
EHue.Value := h;
|
|
||||||
ESat.Value := s;
|
|
||||||
ELum.Value := l;
|
|
||||||
end;
|
|
||||||
end;
|
end;
|
||||||
NewSwatch.Color := c;
|
NewSwatch.Color := c;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TOfficeMoreColorsWin.SetAllCustom(c: TColor);
|
||||||
|
var
|
||||||
|
r, g, b: Integer;
|
||||||
|
h, s, l: Integer;
|
||||||
|
begin
|
||||||
|
if (ERed = nil) or (EGreen = nil) or (EBlue = nil) or
|
||||||
|
(EHue = nil) or (ESat = nil) or (ELum = nil) or
|
||||||
|
(PickerNotebook = nil) or (HSL = nil) or (HSLRing = nil) or (SLH = nil)
|
||||||
|
then
|
||||||
|
exit;
|
||||||
|
|
||||||
|
inc(FLockChange);
|
||||||
|
try
|
||||||
|
NewSwatch.Color := c;
|
||||||
|
r := GetRValue(c);
|
||||||
|
g := GetGValue(c);
|
||||||
|
b := GetBValue(c);
|
||||||
|
RGBtoHSLRange(c, h, s, l);
|
||||||
|
|
||||||
|
if PickerNotebook.ActivePage = nbHSL.Name then
|
||||||
|
HSL.SelectedColor := c
|
||||||
|
else
|
||||||
|
if PickerNotebook.ActivePage = nbHSLRing.Name then
|
||||||
|
HSLRing.SelectedColor := c
|
||||||
|
else
|
||||||
|
if PickerNotebook.ActivePage = nbSLH.Name then
|
||||||
|
SLH.SelectedColor := c
|
||||||
|
else
|
||||||
|
if PickerNotebook.ActivePage = nbRGB.Name then
|
||||||
|
begin
|
||||||
|
RTrackbar.SelectedColor := c;
|
||||||
|
GTrackbar.SelectedColor := c;
|
||||||
|
BTrackbar.SelectedColor := c;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
exit; //raise Exception.Create('Notbook page not prepared for color pickers');
|
||||||
|
|
||||||
|
ERed.Value := r;
|
||||||
|
EGreen.Value := g;
|
||||||
|
EBlue.Value := b;
|
||||||
|
EHue.Value := h;
|
||||||
|
ESat.Value := s;
|
||||||
|
ELum.Value := l;
|
||||||
|
finally
|
||||||
|
dec(FLockChange);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TOfficeMoreColorsWin.SetShowHint(AValue: Boolean);
|
||||||
|
begin
|
||||||
|
inherited ShowHint := AValue;
|
||||||
|
// Unfortunately Notebook does not have a Hint and ParentHint...
|
||||||
|
HSL.ShowHint := AValue;
|
||||||
|
HSLRing.ShowHint := AValue;
|
||||||
|
SLH.ShowHint := AValue;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TOfficeMoreColorsWin.SLHChange(Sender: TObject);
|
procedure TOfficeMoreColorsWin.SLHChange(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
NewSwatch.Color := SLH.SelectedColor;
|
if FLockChange <> 0 then
|
||||||
|
exit;
|
||||||
|
SetAllCustom(SLH.SelectedColor);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TOfficeMoreColorsWin.PagesChange(Sender: TObject);
|
procedure TOfficeMoreColorsWin.PagesChange(Sender: TObject);
|
||||||
@ -272,8 +399,13 @@ end;
|
|||||||
|
|
||||||
procedure TOfficeMoreColorsWin.FormResize(Sender: TObject);
|
procedure TOfficeMoreColorsWin.FormResize(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
|
{
|
||||||
SLH.Width := SLH.Parent.ClientWidth - SLH.Left;
|
SLH.Width := SLH.Parent.ClientWidth - SLH.Left;
|
||||||
SLH.Height := ColorModel.Top - SLH.Top;
|
SLH.Height := cbColorDisplay.Top - SLH.Top;
|
||||||
|
|
||||||
|
HSLRing.Width := SLH.Width;
|
||||||
|
HSLRing.Height := SLH.Height - 4;
|
||||||
|
}
|
||||||
{$IFDEF mbXP_Lib}
|
{$IFDEF mbXP_Lib}
|
||||||
grip.Left := ClientWidth - 15;
|
grip.Left := ClientWidth - 15;
|
||||||
grip.Top := ClientHeight - 15;
|
grip.Top := ClientHeight - 15;
|
||||||
@ -282,13 +414,6 @@ end;
|
|||||||
|
|
||||||
procedure TOfficeMoreColorsWin.FormCreate(Sender: TObject);
|
procedure TOfficeMoreColorsWin.FormCreate(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
SLH.Width := HSL.Width;
|
|
||||||
SLH.Height := HSL.Height;
|
|
||||||
SLH.Top := HSL.Top;
|
|
||||||
SLH.Left := HSL.Left;
|
|
||||||
SLH.Hide;
|
|
||||||
// SLH.Anchors := [akLeft, akTop, akRight, akBottom];
|
|
||||||
|
|
||||||
{$IFDEF mbXP_Lib}
|
{$IFDEF mbXP_Lib}
|
||||||
ERed := TmbXPSpinEdit.CreateParented(Custom.Handle);
|
ERed := TmbXPSpinEdit.CreateParented(Custom.Handle);
|
||||||
EGreen := TmbXPSpinEdit.CreateParented(Custom.Handle);
|
EGreen := TmbXPSpinEdit.CreateParented(Custom.Handle);
|
||||||
@ -299,7 +424,7 @@ begin
|
|||||||
EGreen := TSpinEdit.CreateParented(Custom.Handle);
|
EGreen := TSpinEdit.CreateParented(Custom.Handle);
|
||||||
EBlue := TSpinEdit.CreateParented(Custom.Handle);
|
EBlue := TSpinEdit.CreateParented(Custom.Handle);
|
||||||
EHue := TSpinEdit.CreateParented(Custom.Handle);
|
EHue := TSpinEdit.CreateParented(Custom.Handle);
|
||||||
ESat := TSpinEdit.createParented(Custom.Handle);
|
ESat := TSpinEdit.CreateParented(Custom.Handle);
|
||||||
ELum := TSpinEdit.CreateParented(Custom.Handle);
|
ELum := TSpinEdit.CreateParented(Custom.Handle);
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
with ERed do
|
with ERed do
|
||||||
@ -307,8 +432,8 @@ begin
|
|||||||
Name := 'ERed';
|
Name := 'ERed';
|
||||||
Width := 47;
|
Width := 47;
|
||||||
Height := 22;
|
Height := 22;
|
||||||
Left := ColorModel.Left;
|
Left := cbColorDisplay.Left;
|
||||||
Top := LRed.Top - 4; //198;
|
Top := LRed.Top - 4;
|
||||||
Alignment := taRightJustify;
|
Alignment := taRightJustify;
|
||||||
Anchors := [akLeft, akBottom];
|
Anchors := [akLeft, akBottom];
|
||||||
MaxValue := 255;
|
MaxValue := 255;
|
||||||
@ -321,8 +446,8 @@ begin
|
|||||||
Name := 'EGreen';
|
Name := 'EGreen';
|
||||||
Width := 47;
|
Width := 47;
|
||||||
Height := 22;
|
Height := 22;
|
||||||
Left := ColorModel.Left;
|
Left := cbColorDisplay.Left;
|
||||||
Top := LGreen.Top - 3; //224;
|
Top := LGreen.Top - 3;
|
||||||
Alignment := taRightJustify;
|
Alignment := taRightJustify;
|
||||||
Anchors := [akLeft, akBottom];
|
Anchors := [akLeft, akBottom];
|
||||||
MaxValue := 255;
|
MaxValue := 255;
|
||||||
@ -335,8 +460,8 @@ begin
|
|||||||
Name := 'EBlue';
|
Name := 'EBlue';
|
||||||
Width := 47;
|
Width := 47;
|
||||||
Height := 22;
|
Height := 22;
|
||||||
Left := ColorModel.Left;
|
Left := cbColorDisplay.Left;
|
||||||
Top := LBlue.Top - 4; //251;
|
Top := LBlue.Top - 4;
|
||||||
Alignment := taRightJustify;
|
Alignment := taRightJustify;
|
||||||
Anchors := [akLeft, akBottom];
|
Anchors := [akLeft, akBottom];
|
||||||
MaxValue := 255;
|
MaxValue := 255;
|
||||||
@ -349,7 +474,7 @@ begin
|
|||||||
Name := 'EHue';
|
Name := 'EHue';
|
||||||
Width := 47;
|
Width := 47;
|
||||||
Height := 22;
|
Height := 22;
|
||||||
Left := ColorModel.Left + ColorModel.Width - Width;
|
Left := cbColorDisplay.Left + cbColorDisplay.Width - Width;
|
||||||
Top := ERed.Top;
|
Top := ERed.Top;
|
||||||
Alignment := taRightJustify;
|
Alignment := taRightJustify;
|
||||||
Anchors := [akLeft, akBottom];
|
Anchors := [akLeft, akBottom];
|
||||||
@ -363,7 +488,7 @@ begin
|
|||||||
Name := 'ESat';
|
Name := 'ESat';
|
||||||
Width := 47;
|
Width := 47;
|
||||||
Height := 22;
|
Height := 22;
|
||||||
Left := ColorModel.Left + ColorModel.Width - Width;
|
Left := cbColorDisplay.Left + cbColorDisplay.Width - Width;
|
||||||
Top := EGreen.Top;
|
Top := EGreen.Top;
|
||||||
Alignment := taRightJustify;
|
Alignment := taRightJustify;
|
||||||
Anchors := [akLeft, akBottom];
|
Anchors := [akLeft, akBottom];
|
||||||
@ -377,7 +502,7 @@ begin
|
|||||||
Name := 'ELum';
|
Name := 'ELum';
|
||||||
Width := 47;
|
Width := 47;
|
||||||
Height := 22;
|
Height := 22;
|
||||||
Left := ColorModel.Left + ColorModel.Width - Width;
|
Left := cbColorDisplay.Left + cbColorDisplay.Width - Width;
|
||||||
Top := EBlue.Top;
|
Top := EBlue.Top;
|
||||||
Alignment := taRightJustify;
|
Alignment := taRightJustify;
|
||||||
Anchors := [akLeft, akBottom];
|
Anchors := [akLeft, akBottom];
|
||||||
|
@ -32,8 +32,6 @@ type
|
|||||||
FSLCursor, FHCursor: TCursor;
|
FSLCursor, FHCursor: TCursor;
|
||||||
PBack: TBitmap;
|
PBack: TBitmap;
|
||||||
function GetManual: boolean;
|
function GetManual: boolean;
|
||||||
function GetShowHint: Boolean;
|
|
||||||
procedure SetShowHint(AValue: Boolean);
|
|
||||||
procedure SelectColor(c: TColor);
|
procedure SelectColor(c: TColor);
|
||||||
procedure SetH(v: integer);
|
procedure SetH(v: integer);
|
||||||
procedure SetS(v: integer);
|
procedure SetS(v: integer);
|
||||||
@ -81,7 +79,7 @@ type
|
|||||||
property HPickerCursor: TCursor read FHCursor write SetHCursor default crDefault;
|
property HPickerCursor: TCursor read FHCursor write SetHCursor default crDefault;
|
||||||
property SLPickerCursor: TCursor read FSLCursor write SetSLCursor default crDefault;
|
property SLPickerCursor: TCursor read FSLCursor write SetSLCursor default crDefault;
|
||||||
property TabStop default true;
|
property TabStop default true;
|
||||||
property ShowHint read GetShowHint write SetShowHint;
|
property ShowHint;
|
||||||
property ParentShowHint;
|
property ParentShowHint;
|
||||||
property Anchors;
|
property Anchors;
|
||||||
property Align;
|
property Align;
|
||||||
@ -328,18 +326,6 @@ begin
|
|||||||
Result := FHPicker.Manual or FSLPicker.Manual;
|
Result := FHPicker.Manual or FSLPicker.Manual;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TSLHColorPicker.GetShowHint: Boolean;
|
|
||||||
begin
|
|
||||||
result := inherited ShowHint;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TSLHColorPicker.SetShowHint(AValue: Boolean);
|
|
||||||
begin
|
|
||||||
inherited ShowHint := AValue;
|
|
||||||
FSLPicker.ShowHint := AValue;
|
|
||||||
FHPicker.ShowHint := AValue;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TSLHColorPicker.Resize;
|
procedure TSLHColorPicker.Resize;
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
|
@ -1,17 +1,17 @@
|
|||||||
object Form1: TForm1
|
object Form1: TForm1
|
||||||
Left = 447
|
Left = 447
|
||||||
Height = 344
|
Height = 376
|
||||||
Top = 197
|
Top = 197
|
||||||
Width = 543
|
Width = 539
|
||||||
Caption = 'mbColor Lib v2.0.1 Demo'
|
Caption = 'mbColor Lib v2.0.1 Demo'
|
||||||
ClientHeight = 344
|
ClientHeight = 376
|
||||||
ClientWidth = 543
|
ClientWidth = 539
|
||||||
Font.Color = clWindowText
|
Font.Color = clWindowText
|
||||||
OnCreate = FormCreate
|
OnCreate = FormCreate
|
||||||
ShowHint = True
|
ShowHint = True
|
||||||
LCLVersion = '1.7'
|
LCLVersion = '1.7'
|
||||||
object Label1: TLabel
|
object Label1: TLabel
|
||||||
Left = 412
|
Left = 416
|
||||||
Height = 15
|
Height = 15
|
||||||
Top = 8
|
Top = 8
|
||||||
Width = 73
|
Width = 73
|
||||||
@ -20,7 +20,7 @@ object Form1: TForm1
|
|||||||
ParentColor = False
|
ParentColor = False
|
||||||
end
|
end
|
||||||
object Label2: TLabel
|
object Label2: TLabel
|
||||||
Left = 412
|
Left = 416
|
||||||
Height = 15
|
Height = 15
|
||||||
Top = 112
|
Top = 112
|
||||||
Width = 96
|
Width = 96
|
||||||
@ -29,9 +29,9 @@ object Form1: TForm1
|
|||||||
ParentColor = False
|
ParentColor = False
|
||||||
end
|
end
|
||||||
object Label5: TLabel
|
object Label5: TLabel
|
||||||
Left = 412
|
Left = 416
|
||||||
Height = 75
|
Height = 75
|
||||||
Top = 238
|
Top = 248
|
||||||
Width = 99
|
Width = 99
|
||||||
Anchors = [akTop, akRight]
|
Anchors = [akTop, akRight]
|
||||||
Caption = 'Aditional controls:'#13#13'- Arrow keys'#13'- Ctrl + Arrow keys'#13'- Mouse wheel'
|
Caption = 'Aditional controls:'#13#13'- Arrow keys'#13'- Ctrl + Arrow keys'#13'- Mouse wheel'
|
||||||
@ -39,12 +39,12 @@ object Form1: TForm1
|
|||||||
end
|
end
|
||||||
object PageControl1: TPageControl
|
object PageControl1: TPageControl
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 331
|
Height = 363
|
||||||
Top = 6
|
Top = 6
|
||||||
Width = 399
|
Width = 403
|
||||||
ActivePage = TabSheet6
|
ActivePage = TabSheet7
|
||||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||||
TabIndex = 5
|
TabIndex = 7
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
OnMouseMove = PageControl1MouseMove
|
OnMouseMove = PageControl1MouseMove
|
||||||
object TabSheet1: TTabSheet
|
object TabSheet1: TTabSheet
|
||||||
@ -616,16 +616,17 @@ object Form1: TForm1
|
|||||||
end
|
end
|
||||||
object TabSheet6: TTabSheet
|
object TabSheet6: TTabSheet
|
||||||
Caption = 'SLHColorPicker'
|
Caption = 'SLHColorPicker'
|
||||||
ClientHeight = 303
|
ClientHeight = 329
|
||||||
ClientWidth = 391
|
ClientWidth = 387
|
||||||
ImageIndex = 5
|
ImageIndex = 5
|
||||||
object SLHColorPicker1: TSLHColorPicker
|
object SLHColorPicker1: TSLHColorPicker
|
||||||
Left = 5
|
Left = 8
|
||||||
Height = 291
|
Height = 317
|
||||||
Top = 6
|
Top = 6
|
||||||
Width = 381
|
Width = 377
|
||||||
HPickerHintFormat = 'Hue: %h (selected)'
|
HPickerHintFormat = 'Hue: %h (selected)'
|
||||||
SLPickerHintFormat = 'S: %s L: %l'#13'Hex: %hex'
|
SLPickerHintFormat = 'S: %s L: %l'#13'Hex: %hex'
|
||||||
|
ParentShowHint = False
|
||||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
OnChange = SLHColorPicker1Change
|
OnChange = SLHColorPicker1Change
|
||||||
@ -634,32 +635,35 @@ object Form1: TForm1
|
|||||||
end
|
end
|
||||||
object TabSheet11: TTabSheet
|
object TabSheet11: TTabSheet
|
||||||
Caption = 'Lists && Trees'
|
Caption = 'Lists && Trees'
|
||||||
ClientHeight = 303
|
ClientHeight = 335
|
||||||
ClientWidth = 391
|
ClientWidth = 395
|
||||||
ImageIndex = 10
|
ImageIndex = 10
|
||||||
object mbColorList1: TmbColorList
|
object mbColorList1: TmbColorList
|
||||||
Left = 192
|
Left = 200
|
||||||
Height = 244
|
Height = 278
|
||||||
Top = 12
|
Top = 10
|
||||||
Width = 183
|
Width = 183
|
||||||
|
Anchors = [akTop, akLeft, akBottom]
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
end
|
end
|
||||||
object mbColorTree1: TmbColorTree
|
object mbColorTree1: TmbColorTree
|
||||||
Left = 8
|
Left = 8
|
||||||
Height = 247
|
Height = 279
|
||||||
Top = 10
|
Top = 10
|
||||||
Width = 171
|
Width = 184
|
||||||
InfoLabelText = 'Color Values:'
|
InfoLabelText = 'Color Values:'
|
||||||
InfoDisplay1 = 'RGB: %r.%g.%b'
|
InfoDisplay1 = 'RGB: %r.%g.%b'
|
||||||
InfoDisplay2 = 'HEX: #%hex'
|
InfoDisplay2 = 'HEX: #%hex'
|
||||||
|
Anchors = [akTop, akLeft, akBottom]
|
||||||
Indent = 51
|
Indent = 51
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
end
|
end
|
||||||
object Button5: TButton
|
object Button5: TButton
|
||||||
Left = 120
|
Left = 128
|
||||||
Height = 25
|
Height = 25
|
||||||
Top = 264
|
Top = 296
|
||||||
Width = 137
|
Width = 137
|
||||||
|
Anchors = [akLeft, akBottom]
|
||||||
Caption = 'Add colors from palette'
|
Caption = 'Add colors from palette'
|
||||||
OnClick = Button5Click
|
OnClick = Button5Click
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
@ -667,8 +671,8 @@ object Form1: TForm1
|
|||||||
end
|
end
|
||||||
object TabSheet7: TTabSheet
|
object TabSheet7: TTabSheet
|
||||||
Caption = 'More'
|
Caption = 'More'
|
||||||
ClientHeight = 303
|
ClientHeight = 335
|
||||||
ClientWidth = 391
|
ClientWidth = 395
|
||||||
ImageIndex = 6
|
ImageIndex = 6
|
||||||
object Label9: TLabel
|
object Label9: TLabel
|
||||||
Left = 128
|
Left = 128
|
||||||
@ -700,8 +704,8 @@ object Form1: TForm1
|
|||||||
object LColorPicker1: TLColorPicker
|
object LColorPicker1: TLColorPicker
|
||||||
Left = 34
|
Left = 34
|
||||||
Height = 25
|
Height = 25
|
||||||
Top = 192
|
Top = 224
|
||||||
Width = 343
|
Width = 347
|
||||||
HintFormat = 'Luminance: %l (selected)'
|
HintFormat = 'Luminance: %l (selected)'
|
||||||
SelectionIndicator = siRect
|
SelectionIndicator = siRect
|
||||||
Anchors = [akLeft, akRight, akBottom]
|
Anchors = [akLeft, akRight, akBottom]
|
||||||
@ -713,8 +717,8 @@ object Form1: TForm1
|
|||||||
object VColorPicker1: TVColorPicker
|
object VColorPicker1: TVColorPicker
|
||||||
Left = 34
|
Left = 34
|
||||||
Height = 21
|
Height = 21
|
||||||
Top = 160
|
Top = 192
|
||||||
Width = 343
|
Width = 347
|
||||||
HintFormat = 'Value: %v (selected)'
|
HintFormat = 'Value: %v (selected)'
|
||||||
ArrowPlacement = spBefore
|
ArrowPlacement = spBefore
|
||||||
NewArrowStyle = True
|
NewArrowStyle = True
|
||||||
@ -729,8 +733,8 @@ object Form1: TForm1
|
|||||||
object HColorPicker1: THColorPicker
|
object HColorPicker1: THColorPicker
|
||||||
Left = 34
|
Left = 34
|
||||||
Height = 61
|
Height = 61
|
||||||
Top = 231
|
Top = 263
|
||||||
Width = 343
|
Width = 347
|
||||||
HintFormat = 'Hue: %h (selected)'
|
HintFormat = 'Hue: %h (selected)'
|
||||||
Increment = 5
|
Increment = 5
|
||||||
ArrowPlacement = spBoth
|
ArrowPlacement = spBoth
|
||||||
@ -742,7 +746,7 @@ object Form1: TForm1
|
|||||||
end
|
end
|
||||||
object SColorPicker1: TSColorPicker
|
object SColorPicker1: TSColorPicker
|
||||||
Left = 8
|
Left = 8
|
||||||
Height = 222
|
Height = 254
|
||||||
Top = 70
|
Top = 70
|
||||||
Width = 19
|
Width = 19
|
||||||
HintFormat = 'Saturation: %s (selected)'
|
HintFormat = 'Saturation: %s (selected)'
|
||||||
@ -758,9 +762,9 @@ object Form1: TForm1
|
|||||||
end
|
end
|
||||||
object Memo1: TMemo
|
object Memo1: TMemo
|
||||||
Left = 128
|
Left = 128
|
||||||
Height = 118
|
Height = 150
|
||||||
Top = 26
|
Top = 26
|
||||||
Width = 249
|
Width = 253
|
||||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||||
Lines.Strings = (
|
Lines.Strings = (
|
||||||
'The following variables will be replaced in the hint at runtime:'
|
'The following variables will be replaced in the hint at runtime:'
|
||||||
@ -805,8 +809,8 @@ object Form1: TForm1
|
|||||||
end
|
end
|
||||||
object TabSheet8: TTabSheet
|
object TabSheet8: TTabSheet
|
||||||
Caption = 'Other'
|
Caption = 'Other'
|
||||||
ClientHeight = 303
|
ClientHeight = 335
|
||||||
ClientWidth = 391
|
ClientWidth = 395
|
||||||
ImageIndex = 7
|
ImageIndex = 7
|
||||||
object HSColorPicker1: THSColorPicker
|
object HSColorPicker1: THSColorPicker
|
||||||
Left = 6
|
Left = 6
|
||||||
@ -1108,7 +1112,7 @@ object Form1: TForm1
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
object sc: TmbColorPreview
|
object sc: TmbColorPreview
|
||||||
Left = 412
|
Left = 416
|
||||||
Height = 62
|
Height = 62
|
||||||
Top = 25
|
Top = 25
|
||||||
Width = 108
|
Width = 108
|
||||||
@ -1116,7 +1120,7 @@ object Form1: TForm1
|
|||||||
Anchors = [akTop, akRight]
|
Anchors = [akTop, akRight]
|
||||||
end
|
end
|
||||||
object uc: TmbColorPreview
|
object uc: TmbColorPreview
|
||||||
Left = 412
|
Left = 416
|
||||||
Height = 62
|
Height = 62
|
||||||
Top = 130
|
Top = 130
|
||||||
Width = 108
|
Width = 108
|
||||||
@ -1124,7 +1128,7 @@ object Form1: TForm1
|
|||||||
Anchors = [akTop, akRight]
|
Anchors = [akTop, akRight]
|
||||||
end
|
end
|
||||||
object tb1: TTrackBar
|
object tb1: TTrackBar
|
||||||
Left = 412
|
Left = 416
|
||||||
Height = 20
|
Height = 20
|
||||||
Hint = 'Opacity'
|
Hint = 'Opacity'
|
||||||
Top = 90
|
Top = 90
|
||||||
@ -1137,7 +1141,7 @@ object Form1: TForm1
|
|||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
end
|
end
|
||||||
object tb2: TTrackBar
|
object tb2: TTrackBar
|
||||||
Left = 412
|
Left = 416
|
||||||
Height = 20
|
Height = 20
|
||||||
Top = 196
|
Top = 196
|
||||||
Width = 108
|
Width = 108
|
||||||
@ -1148,34 +1152,46 @@ object Form1: TForm1
|
|||||||
Anchors = [akTop, akRight]
|
Anchors = [akTop, akRight]
|
||||||
TabOrder = 4
|
TabOrder = 4
|
||||||
end
|
end
|
||||||
object CheckBox3: TCheckBox
|
object CbWebSsafe: TCheckBox
|
||||||
Left = 412
|
Left = 416
|
||||||
Height = 19
|
Height = 19
|
||||||
Top = 320
|
Top = 328
|
||||||
Width = 66
|
Width = 66
|
||||||
Anchors = [akTop, akRight]
|
Anchors = [akTop, akRight]
|
||||||
Caption = 'WebSafe'
|
Caption = 'WebSafe'
|
||||||
OnClick = CheckBox3Click
|
OnClick = CbWebSsafeClick
|
||||||
TabOrder = 5
|
TabOrder = 5
|
||||||
end
|
end
|
||||||
object CheckBox4: TCheckBox
|
object CbSwatchStyle: TCheckBox
|
||||||
Left = 412
|
Left = 416
|
||||||
Height = 19
|
Height = 19
|
||||||
Top = 218
|
Top = 218
|
||||||
Width = 83
|
Width = 83
|
||||||
Anchors = [akTop, akRight]
|
Anchors = [akTop, akRight]
|
||||||
Caption = 'SwatchStyle'
|
Caption = 'SwatchStyle'
|
||||||
OnClick = CheckBox4Click
|
OnClick = CbSwatchStyleClick
|
||||||
TabOrder = 6
|
TabOrder = 6
|
||||||
end
|
end
|
||||||
|
object CbShowHints: TCheckBox
|
||||||
|
Left = 416
|
||||||
|
Height = 19
|
||||||
|
Top = 349
|
||||||
|
Width = 78
|
||||||
|
Anchors = [akTop, akRight]
|
||||||
|
Caption = 'Show hints'
|
||||||
|
Checked = True
|
||||||
|
OnChange = CbShowHintsChange
|
||||||
|
State = cbChecked
|
||||||
|
TabOrder = 7
|
||||||
|
end
|
||||||
object mbOfficeColorDialog1: TmbOfficeColorDialog
|
object mbOfficeColorDialog1: TmbOfficeColorDialog
|
||||||
UseHints = True
|
UseHints = True
|
||||||
left = 448
|
left = 456
|
||||||
top = 136
|
top = 136
|
||||||
end
|
end
|
||||||
object OpenDialog1: TOpenDialog
|
object OpenDialog1: TOpenDialog
|
||||||
Filter = 'JASC PAL (*.pal)|*.pal|Photoshop (*.act; *.aco)|*.act;*.aco'
|
Filter = 'JASC PAL (*.pal)|*.pal|Photoshop (*.act; *.aco)|*.act;*.aco'
|
||||||
left = 440
|
left = 456
|
||||||
top = 40
|
top = 40
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -20,6 +20,7 @@ type
|
|||||||
{ TForm1 }
|
{ TForm1 }
|
||||||
|
|
||||||
TForm1 = class(TForm)
|
TForm1 = class(TForm)
|
||||||
|
CbShowHints: TCheckBox;
|
||||||
Label10: TLabel;
|
Label10: TLabel;
|
||||||
Label11: TLabel;
|
Label11: TLabel;
|
||||||
Label12: TLabel;
|
Label12: TLabel;
|
||||||
@ -95,14 +96,15 @@ type
|
|||||||
CIELColorPicker1: TCIELColorPicker;
|
CIELColorPicker1: TCIELColorPicker;
|
||||||
CIEAColorPicker1: TCIEAColorPicker;
|
CIEAColorPicker1: TCIEAColorPicker;
|
||||||
CIEBColorPicker1: TCIEBColorPicker;
|
CIEBColorPicker1: TCIEBColorPicker;
|
||||||
CheckBox3: TCheckBox;
|
CbWebSsafe: TCheckBox;
|
||||||
TabSheet11: TTabSheet;
|
TabSheet11: TTabSheet;
|
||||||
mbColorList1: TmbColorList;
|
mbColorList1: TmbColorList;
|
||||||
mbColorTree1: TmbColorTree;
|
mbColorTree1: TmbColorTree;
|
||||||
Button5: TButton;
|
Button5: TButton;
|
||||||
Memo1: TMemo;
|
Memo1: TMemo;
|
||||||
Label9: TLabel;
|
Label9: TLabel;
|
||||||
CheckBox4: TCheckBox;
|
CbSwatchStyle: TCheckBox;
|
||||||
|
procedure CbShowHintsChange(Sender: TObject);
|
||||||
procedure PageControl1MouseMove(Sender: TObject; Shift: TShiftState;
|
procedure PageControl1MouseMove(Sender: TObject; Shift: TShiftState;
|
||||||
X, Y: Integer);
|
X, Y: Integer);
|
||||||
procedure tb1Change(Sender: TObject);
|
procedure tb1Change(Sender: TObject);
|
||||||
@ -148,9 +150,9 @@ type
|
|||||||
procedure ComboBox3Change(Sender: TObject);
|
procedure ComboBox3Change(Sender: TObject);
|
||||||
procedure ComboBox4Change(Sender: TObject);
|
procedure ComboBox4Change(Sender: TObject);
|
||||||
procedure UpDown1Changing(Sender: TObject; var AllowChange: Boolean);
|
procedure UpDown1Changing(Sender: TObject; var AllowChange: Boolean);
|
||||||
procedure CheckBox3Click(Sender: TObject);
|
procedure CbWebSsafeClick(Sender: TObject);
|
||||||
procedure Button5Click(Sender: TObject);
|
procedure Button5Click(Sender: TObject);
|
||||||
procedure CheckBox4Click(Sender: TObject);
|
procedure CbSwatchStyleClick(Sender: TObject);
|
||||||
private
|
private
|
||||||
{ Private declarations }
|
{ Private declarations }
|
||||||
public
|
public
|
||||||
@ -365,13 +367,13 @@ allowchange := true;
|
|||||||
mbcolorpalette1.CellSize := abs(updown1.Position);
|
mbcolorpalette1.CellSize := abs(updown1.Position);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TForm1.CheckBox3Click(Sender: TObject);
|
procedure TForm1.CbWebSsafeClick(Sender: TObject);
|
||||||
var
|
var
|
||||||
i: integer;
|
i: integer;
|
||||||
begin
|
begin
|
||||||
for i := 0 to ComponentCount - 1 do
|
for i := 0 to ComponentCount - 1 do
|
||||||
if IsPublishedProp(components[i], 'WebSafe') = true then
|
if IsPublishedProp(components[i], 'WebSafe') = true then
|
||||||
SetOrdProp(components[i], 'WebSafe', integer(checkbox3.checked));
|
SetOrdProp(components[i], 'WebSafe', integer(CbWebSsafe.checked));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TForm1.Button5Click(Sender: TObject);
|
procedure TForm1.Button5Click(Sender: TObject);
|
||||||
@ -389,10 +391,16 @@ begin
|
|||||||
mbcolorlist1.UpdateColors;
|
mbcolorlist1.UpdateColors;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TForm1.CheckBox4Click(Sender: TObject);
|
procedure TForm1.CbSwatchStyleClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
sc.swatchstyle := checkbox4.Checked;
|
sc.swatchstyle := CbSwatchStyle.Checked;
|
||||||
uc.swatchstyle := checkbox4.checked;
|
uc.swatchstyle := CbSwatchStyle.checked;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TForm1.CbShowHintsChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
PageControl1.ShowHint := CbShowHints.Checked;
|
||||||
|
mbOfficeColorDialog1.UseHints := CbShowHints.Checked;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
@ -146,7 +146,7 @@ begin
|
|||||||
inherited;
|
inherited;
|
||||||
if ShowHint and not FHintShown then
|
if ShowHint and not FHintShown then
|
||||||
begin
|
begin
|
||||||
if MouseOnPicker(X, Y) then //and not FHintShown then
|
if MouseOnPicker(X, Y) then
|
||||||
begin
|
begin
|
||||||
FHintTimer.Enabled := false;
|
FHintTimer.Enabled := false;
|
||||||
FHintState := hsWaitingToShow;
|
FHintState := hsWaitingToShow;
|
||||||
@ -206,7 +206,7 @@ begin
|
|||||||
// Offscreen.PixelFormat := pf32bit;
|
// Offscreen.PixelFormat := pf32bit;
|
||||||
if Color = clDefault then begin
|
if Color = clDefault then begin
|
||||||
Offscreen.Transparent := true;
|
Offscreen.Transparent := true;
|
||||||
Offscreen.TransparentColor := GetDefaultColor(dctBrush);
|
Offscreen.TransparentColor := clForm; //GetDefaultColor(dctBrush);
|
||||||
end;
|
end;
|
||||||
Offscreen.Width := Width;
|
Offscreen.Width := Width;
|
||||||
Offscreen.Height := Height;
|
Offscreen.Height := Height;
|
||||||
|
Reference in New Issue
Block a user