NSDockTile - Implement methods to update the icon and show badge (#185)

NSDockTile - Implement methods to update the icon and show badge using a NSCustomImageRep. Link the NSDockTile view with the AppIcon window contentView.
GSTheme - add badgeColor color and corresponding methods to theme background, decoration and text color
This commit is contained in:
Gregory Casamento 2023-07-27 03:17:18 -04:00 committed by GitHub
parent a34867faee
commit f2b79365f4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 196 additions and 15 deletions

View file

@ -71,6 +71,7 @@
#import "AppKit/NSImage.h"
#import "AppKit/NSMenu.h"
#import "AppKit/NSMenuItem.h"
#import "AppKit/NSDockTile.h"
#import "AppKit/NSNibLoading.h"
#import "AppKit/NSPageLayout.h"
#import "AppKit/NSPanel.h"
@ -1244,6 +1245,7 @@ static BOOL _isAutolaunchChecked = NO;
TEST_RELEASE(_app_icon);
TEST_RELEASE(_app_icon_window);
TEST_RELEASE(_dock_tile);
TEST_RELEASE(_infoPanel);
/* Destroy the default context */
@ -2458,6 +2460,15 @@ image.</p><p>See Also: -applicationIconImage</p>
return _app_icon_window;
}
- (NSDockTile *) dockTile
{
if (!_dock_tile)
{
_dock_tile = [[NSDockTile alloc] init];
[_dock_tile setContentView: [_app_icon_window contentView]];
}
return _dock_tile;
}
/*
* Hiding and arranging windows
*/