You've already forked lazarus-ccr
Improved TOvcLabel's Style Manager property editor a little; added support for Cmd+click to TOvcVLB for Carbon.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1454 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -197,18 +197,11 @@ begin
|
|||||||
Style := ocsDropDownList;
|
Style := ocsDropDownList;
|
||||||
|
|
||||||
FShowColorNames := True;
|
FShowColorNames := True;
|
||||||
end;
|
|
||||||
|
// On Carbon, SetSelectedColor gets called before Items is populated
|
||||||
destructor TOvcCustomColorComboBox.Destroy;
|
// in CreateWnd below, so moved code to here.
|
||||||
begin
|
// Note: Isn't CreateWnd an odd place to initialize a control?
|
||||||
inherited;
|
{$IFDEF LCL}
|
||||||
end;
|
|
||||||
|
|
||||||
{ - modified}
|
|
||||||
procedure TOvcCustomColorComboBox.CreateWnd;
|
|
||||||
begin
|
|
||||||
inherited CreateWnd;
|
|
||||||
|
|
||||||
Text := '';
|
Text := '';
|
||||||
Items.Clear;
|
Items.Clear;
|
||||||
Items.Add(GetOrphStr(SCColorBlack));
|
Items.Add(GetOrphStr(SCColorBlack));
|
||||||
@ -235,6 +228,47 @@ begin
|
|||||||
Items.Add(GetOrphStr(SCColorCream));
|
Items.Add(GetOrphStr(SCColorCream));
|
||||||
|
|
||||||
ItemIndex := 0;
|
ItemIndex := 0;
|
||||||
|
{$ENDIF}
|
||||||
|
end;
|
||||||
|
|
||||||
|
destructor TOvcCustomColorComboBox.Destroy;
|
||||||
|
begin
|
||||||
|
inherited;
|
||||||
|
end;
|
||||||
|
|
||||||
|
{ - modified}
|
||||||
|
procedure TOvcCustomColorComboBox.CreateWnd;
|
||||||
|
begin
|
||||||
|
inherited CreateWnd;
|
||||||
|
|
||||||
|
{$IFNDEF LCL} //See note above.
|
||||||
|
Text := '';
|
||||||
|
Items.Clear;
|
||||||
|
Items.Add(GetOrphStr(SCColorBlack));
|
||||||
|
Items.Add(GetOrphStr(SCColorMaroon));
|
||||||
|
Items.Add(GetOrphStr(SCColorGreen));
|
||||||
|
Items.Add(GetOrphStr(SCColorOlive));
|
||||||
|
Items.Add(GetOrphStr(SCColorNavy));
|
||||||
|
Items.Add(GetOrphStr(SCColorPurple));
|
||||||
|
Items.Add(GetOrphStr(SCColorTeal));
|
||||||
|
Items.Add(GetOrphStr(SCColorGray));
|
||||||
|
Items.Add(GetOrphStr(SCColorSilver));
|
||||||
|
Items.Add(GetOrphStr(SCColorRed));
|
||||||
|
Items.Add(GetOrphStr(SCColorLime));
|
||||||
|
Items.Add(GetOrphStr(SCColorYellow));
|
||||||
|
Items.Add(GetOrphStr(SCColorBlue));
|
||||||
|
Items.Add(GetOrphStr(SCColorFuchsia));
|
||||||
|
Items.Add(GetOrphStr(SCColorAqua));
|
||||||
|
Items.Add(GetOrphStr(SCColorLightGray));
|
||||||
|
Items.Add(GetOrphStr(SCColorMediumGray));
|
||||||
|
Items.Add(GetOrphStr(SCColorDarkGray));
|
||||||
|
Items.Add(GetOrphStr(SCColorWhite));
|
||||||
|
Items.Add(GetOrphStr(SCColorMoneyGreen));
|
||||||
|
Items.Add(GetOrphStr(SCColorSkyBlue));
|
||||||
|
Items.Add(GetOrphStr(SCColorCream));
|
||||||
|
|
||||||
|
ItemIndex := 0;
|
||||||
|
{$ENDIF}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TOvcCustomColorComboBox.DrawItem(Index : Integer; Rect : TRect;
|
procedure TOvcCustomColorComboBox.DrawItem(Index : Integer; Rect : TRect;
|
||||||
|
@ -1524,7 +1524,7 @@ begin
|
|||||||
with PMStruct^ do begin
|
with PMStruct^ do begin
|
||||||
ItemWidth := ClientWidth;
|
ItemWidth := ClientWidth;
|
||||||
IHeight := ItemHeight;
|
IHeight := ItemHeight;
|
||||||
MeasureItem(ItemID, IHeight);
|
MeasureItem(LongInt(ItemID), IHeight); // LCL: UINT ItemID can be out of range on Win.
|
||||||
ItemHeight := IHeight;
|
ItemHeight := IHeight;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
@ -2395,7 +2395,11 @@ begin
|
|||||||
|
|
||||||
{get the key state}
|
{get the key state}
|
||||||
if FMultiSelect then begin
|
if FMultiSelect then begin
|
||||||
|
{$IFNDEF LCLCarbon}
|
||||||
CtrlKeyDown := GetKeyState(VK_CONTROL) and $8000 <> 0;
|
CtrlKeyDown := GetKeyState(VK_CONTROL) and $8000 <> 0;
|
||||||
|
{$ELSE} {Cmd+click used on Mac for non-contiguous selection; see it as VK_LWIN}
|
||||||
|
CtrlKeyDown := GetKeyState(VK_LWIN) and $8000 <> 0;
|
||||||
|
{$ENDIF}
|
||||||
ShiftKeyDown := GetKeyState(VK_SHIFT) and $8000 <> 0;
|
ShiftKeyDown := GetKeyState(VK_SHIFT) and $8000 <> 0;
|
||||||
end else begin
|
end else begin
|
||||||
CtrlKeyDown := False;
|
CtrlKeyDown := False;
|
||||||
|
Reference in New Issue
Block a user