Added: ItemDisabledColor (musikCube painter is still not configurable enough though)
This commit is contained in:
parent
fe5574b9e9
commit
6b13daa2dc
@ -83,6 +83,7 @@ type
|
|||||||
FIndicatorColors: TX2MenuBarmCColors;
|
FIndicatorColors: TX2MenuBarmCColors;
|
||||||
FItemColors: TX2MenuBarmCColors;
|
FItemColors: TX2MenuBarmCColors;
|
||||||
FItemHeight: Integer;
|
FItemHeight: Integer;
|
||||||
|
FItemDisabledColor: TColor;
|
||||||
|
|
||||||
procedure SetColor(const Value: TColor);
|
procedure SetColor(const Value: TColor);
|
||||||
procedure SetGroupColors(const Value: TX2MenuBarmCColors);
|
procedure SetGroupColors(const Value: TX2MenuBarmCColors);
|
||||||
@ -90,6 +91,7 @@ type
|
|||||||
procedure SetIndicatorColors(const Value: TX2MenuBarmCColors);
|
procedure SetIndicatorColors(const Value: TX2MenuBarmCColors);
|
||||||
procedure SetItemColors(const Value: TX2MenuBarmCColors);
|
procedure SetItemColors(const Value: TX2MenuBarmCColors);
|
||||||
procedure SetItemHeight(const Value: Integer);
|
procedure SetItemHeight(const Value: Integer);
|
||||||
|
procedure SetItemDisabledColor(const Value: TColor);
|
||||||
protected
|
protected
|
||||||
procedure ColorChange(Sender: TObject);
|
procedure ColorChange(Sender: TObject);
|
||||||
|
|
||||||
@ -114,6 +116,7 @@ type
|
|||||||
property IndicatorColors: TX2MenuBarmCColors read FIndicatorColors write SetIndicatorColors stored False;
|
property IndicatorColors: TX2MenuBarmCColors read FIndicatorColors write SetIndicatorColors stored False;
|
||||||
property ItemColors: TX2MenuBarmCColors read FItemColors write SetItemColors stored False;
|
property ItemColors: TX2MenuBarmCColors read FItemColors write SetItemColors stored False;
|
||||||
property ItemHeight: Integer read FItemHeight write SetItemHeight stored False;
|
property ItemHeight: Integer read FItemHeight write SetItemHeight stored False;
|
||||||
|
property ItemDisabledColor: TColor read FItemDisabledColor write SetItemDisabledColor stored False;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
@ -127,6 +130,7 @@ begin
|
|||||||
inherited;
|
inherited;
|
||||||
|
|
||||||
FColor := clBtnFace;
|
FColor := clBtnFace;
|
||||||
|
FItemDisabledColor := clGrayText;
|
||||||
FGroupColors := TX2MenuBarmCColors.Create;
|
FGroupColors := TX2MenuBarmCColors.Create;
|
||||||
FGroupHeight := 22;
|
FGroupHeight := 22;
|
||||||
FIndicatorColors := TX2MenuBarmCColors.Create;
|
FIndicatorColors := TX2MenuBarmCColors.Create;
|
||||||
@ -341,6 +345,11 @@ begin
|
|||||||
Inc(textBounds.Left, imageList.Width + 4);
|
Inc(textBounds.Left, imageList.Width + 4);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
if AItem.Enabled then
|
||||||
|
ACanvas.Font.Color := clWindowText
|
||||||
|
else
|
||||||
|
ACanvas.Font.Color := ItemDisabledColor;
|
||||||
|
|
||||||
if not AItem.Visible then
|
if not AItem.Visible then
|
||||||
{ Design-time }
|
{ Design-time }
|
||||||
ACanvas.Font.Style := [fsItalic]
|
ACanvas.Font.Style := [fsItalic]
|
||||||
@ -378,6 +387,15 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TX2MenuBarmusikCubePainter.SetItemDisabledColor(const Value: TColor);
|
||||||
|
begin
|
||||||
|
if Value <> FItemDisabledColor then
|
||||||
|
begin
|
||||||
|
FItemDisabledColor := Value;
|
||||||
|
NotifyObservers;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TX2MenuBarmusikCubePainter.SetItemHeight(const Value: Integer);
|
procedure TX2MenuBarmusikCubePainter.SetItemHeight(const Value: Integer);
|
||||||
begin
|
begin
|
||||||
if Value <> FItemHeight then
|
if Value <> FItemHeight then
|
||||||
|
Loading…
Reference in New Issue
Block a user