mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
ADD: add colors for FinderTag in Menus
This commit is contained in:
parent
172c054ce7
commit
b3866c95c8
1 changed files with 19 additions and 0 deletions
|
|
@ -32,6 +32,7 @@ type
|
|||
function isShowingInSidebar: Boolean; message 'tag_isShowingInSidebar';
|
||||
function isUserDefined: Boolean; message 'tag_isUserDefined';
|
||||
function color: NSColor; message 'tag_color';
|
||||
function menuColor: NSColor; message 'tag_menuColor';
|
||||
end;
|
||||
|
||||
{ TFinderTags }
|
||||
|
|
@ -62,6 +63,7 @@ type
|
|||
strict private class var
|
||||
_rectFinderTagNSColors: TFinderTagNSColors;
|
||||
_dotFinderTagNSColors: TFinderTagNSColors;
|
||||
_menuFinderTagNSColors: TFinderTagNSColors;
|
||||
_favoriteTags: NSArray;
|
||||
private
|
||||
class function getAllTags: NSDictionary;
|
||||
|
|
@ -90,6 +92,7 @@ type
|
|||
public
|
||||
class property rectFinderTagNSColors: TFinderTagNSColors read _rectFinderTagNSColors;
|
||||
class property dotFinderTagNSColors: TFinderTagNSColors read _dotFinderTagNSColors;
|
||||
class property menuFinderTagNSColors: TFinderTagNSColors read _menuFinderTagNSColors;
|
||||
class property favoriteTags: NSArray read getFavoriteTags;
|
||||
end;
|
||||
|
||||
|
|
@ -152,6 +155,11 @@ begin
|
|||
Result:= uDarwinFinderModelUtil.rectFinderTagNSColors[ _colorIndex ];
|
||||
end;
|
||||
|
||||
function TFinderTag.menuColor: NSColor;
|
||||
begin
|
||||
Result:= uDarwinFinderModelUtil.menuFinderTagNSColors[ _colorIndex ];
|
||||
end;
|
||||
|
||||
{ TFinderTags }
|
||||
|
||||
class constructor TFinderTags.Create;
|
||||
|
|
@ -670,6 +678,17 @@ begin
|
|||
NSColor.redColor,
|
||||
NSColor.orangeColor
|
||||
];
|
||||
|
||||
_menuFinderTagNSColors:= [
|
||||
NSColor.colorWithCalibratedRed_green_blue_alpha( 0.400, 0.400, 0.400, 1 ).retain,
|
||||
NSColor.colorWithCalibratedRed_green_blue_alpha( 0.612, 0.612, 0.627, 1 ).retain,
|
||||
NSColor.colorWithCalibratedRed_green_blue_alpha( 0.451, 0.800, 0.427, 1 ).retain,
|
||||
NSColor.colorWithCalibratedRed_green_blue_alpha( 0.663, 0.451, 0.804, 1 ).retain,
|
||||
NSColor.colorWithCalibratedRed_green_blue_alpha( 0.306, 0.541, 0.937, 1 ).retain,
|
||||
NSColor.colorWithCalibratedRed_green_blue_alpha( 0.941, 0.812, 0.337, 1 ).retain,
|
||||
NSColor.colorWithCalibratedRed_green_blue_alpha( 1.000, 0.400, 0.349, 1 ).retain,
|
||||
NSColor.colorWithCalibratedRed_green_blue_alpha( 0.922, 0.651, 0.302, 1 ).retain
|
||||
];
|
||||
end;
|
||||
|
||||
procedure initNSSTR;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue