Skip to content

Custom License Templates causes "License" text and bullet to be striped in presentation view #169

Description

@SoCuul

I've noticed that when a Custom License Template is selected in the presentation view, the • License text is striped. However, for any of the other licenses, this is not the case. I am testing this with the Packages License.pkglic folder provided with Packages.

I'm not sure exactly why this is the case (as I am not familiar with the codebase, but it appears that this

- (BOOL)isCustomized
{
return (self.localizations.count>0);
}

is returning zero localization languages, which in turn applies the striped text.

Also for some reason, the striping doesn't update automatically when I change the license, but instead only I change to a different action (in the inspector/keyboard shortcuts) or hover over the PKGPresentationListView. Maybe changes in the inspector need to trigger a view refresh for the steps list view.

Thanks for your incredible work on this project throughout many years, building such a solid piece of software! I'm not sure if there's more than one type of striping that's being used throughout the app to signify other things, so I just tried my best to link the parts that I know are related to what I'm referencing.

NSImage * tImage;
if (tIsDarkMode==NO)
tImage=[NSImage imageNamed:@"Strip32Composite"];
else
tImage=[NSImage imageNamed:@"Strip32CompositeDark"];
[[NSColor colorWithPatternImage:tImage] setFill];
[tBezierPath fill];

if (tIndex >self.selectedStep)
{
if (tWillBeVisible==YES)
{
if (NSAppKitVersionNumber<NSAppKitVersionNumber10_14)
{
tColor=[NSColor grayColor];
}
else
{
tColor=[NSColor tertiaryLabelColor];
}
}
else
{
if (tIsDarkMode==NO)
tColor=[NSColor colorWithPatternImage:[NSImage imageNamed:@"Strip32Disabled"]];
else
tColor=[NSColor colorWithPatternImage:[NSImage imageNamed:@"Strip32DisabledDark"]];
}
}
else
{
if (tWillBeVisible==YES)
{
if (NSAppKitVersionNumber<NSAppKitVersionNumber10_14)
tColor=[NSColor blackColor];
else
tColor=[NSColor labelColor];
}
else
{
if (tIsDarkMode==NO)
tColor=[NSColor colorWithPatternImage:[NSImage imageNamed:@"Strip32"]];
else
tColor=[NSColor colorWithPatternImage:[NSImage imageNamed:@"Strip32Dark"]];
}
}

NSImage * tImage;
if (tIsDarkMode==NO)
tImage=[NSImage imageNamed:@"Strip32"];
else
tImage=[NSImage imageNamed:@"Strip32Dark"];
NSColor * tColor=nil;
if (tImage!=nil)
tColor=[[NSColor colorWithPatternImage:tImage] colorWithAlphaComponent:0.75];
if (tColor==nil)
tColor=[NSColor colorWithDeviceWhite:1.0 alpha:0.75];
[tColor set];

NSImage * tImage=[NSImage imageNamed:@"Strip32Composite"];
[tImage drawAtPoint:NSZeroPoint fromRect:NSZeroRect operation:WBCompositingOperationSourceOver fraction:1.0];

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions