Make drawing use the component cell to render

This commit is contained in:
Gregory John Casamento 2020-05-06 08:38:31 -04:00
parent c67ca273a9
commit 7764903d6d
3 changed files with 12 additions and 12 deletions

View file

@ -252,6 +252,8 @@
@class NSProgressIndicator;
@class NSTableHeaderCell;
@class NSTabViewItem;
@class NSPathControl;
@class NSPathComponentCell;
@class GSDrawTiles;
@class GSTitleView;
@ -975,9 +977,8 @@ APPKIT_EXPORT NSString *GSThemeWillDeactivateNotification;
// NSPathComponentCell
- (void) drawPathComponentCellWithFrame: (NSRect)f
inView: (NSView *)v
withURL: (NSURL *)u
image: (NSImage *)i
inView: (NSPathControl *)pc
withCell: (NSPathComponentCell *)cell
isLastComponent: (BOOL)last;
// NSSegmentedControl drawing methods

View file

@ -954,19 +954,19 @@
// NSPathComponentCell
- (void) drawPathComponentCellWithFrame: (NSRect)f
inView: (NSView *)v
withURL: (NSURL *)u
image: (NSImage *)i
inView: (NSPathControl *)pc
withCell: (NSPathComponentCell *)cell
isLastComponent: (BOOL)lc
{
NSImage *i = [cell image];
NSURL *u = [cell URL];
NSString *string = [[u path] lastPathComponent];
NSRect textFrame = f;
NSRect imgFrame = f;
NSRect arrowFrame = f;
NSImage *arrowImage = [NSImage imageNamed: @"NSMenuArrow"];
NSPathControl *pc = (NSPathControl *)v;
NSPathStyle s = [pc pathStyle];
if (s == NSPathStyleStandard || s == NSPathStyleNavigationBar)
{
if (s == NSPathStyleNavigationBar)
@ -1005,7 +1005,7 @@
{
if (lc == YES)
{
NSRect newFrame = [v frame];
NSRect newFrame = [pc frame];
arrowImage = [NSImage imageNamed: @"common_ArrowDown"];

View file

@ -58,9 +58,8 @@
{
[super drawInteriorWithFrame: f inView: v];
[[GSTheme theme] drawPathComponentCellWithFrame: f
inView: v
withURL: _url
image: _image
inView: (NSPathControl *)v
withCell: self
isLastComponent: _lastComponent];
}