summaryrefslogtreecommitdiffstats
path: root/macosx/Controller.mm
diff options
context:
space:
mode:
authordynaflash <[email protected]>2007-06-29 17:31:08 +0000
committerdynaflash <[email protected]>2007-06-29 17:31:08 +0000
commitae06dd90defa4838913845e9af21c959af4b4c74 (patch)
treef01fa31cde93725d844b2080952112ee31b3da74 /macosx/Controller.mm
parent51a8906f6c81e91c65df6b4732359ee32fbbe74b (diff)
MacGui: Presets use white font when selecting built in presets (previously stayed blue which sucked since it was highlighted in blue, so you couldnt read it when selected).
- Also some test shadow code to shadow the highlighted font similar to Mail.app. In testing looks poor, so its commented out for now. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@644 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx/Controller.mm')
-rw-r--r--macosx/Controller.mm33
1 files changed, 29 insertions, 4 deletions
diff --git a/macosx/Controller.mm b/macosx/Controller.mm
index 2f2d1dabf..8a64f4a0a 100644
--- a/macosx/Controller.mm
+++ b/macosx/Controller.mm
@@ -3498,15 +3498,40 @@ show the built in presets in a blue font. */
forTableColumn:(NSTableColumn *)aTableColumn row:(int)rowIndex
{
NSDictionary *userPresetDict = [UserPresets objectAtIndex:rowIndex];
- if ([[userPresetDict objectForKey:@"Type"] intValue] == 0)
+ NSColor *fontColor;
+ NSColor *shadowColor;
+ /* First, we check to see if its a selected row, if so, we use white since its highlighted in blue */
+ if ([[aTableView selectedRowIndexes] containsIndex:rowIndex] && ([tableView editedRow] != rowIndex))
{
- [aCell setTextColor:[NSColor blueColor]];
+
+ fontColor = [NSColor whiteColor];
+ shadowColor = [NSColor colorWithDeviceRed:(127.0/255.0) green:(140.0/255.0) blue:(160.0/255.0) alpha:1.0];
}
else
{
- [aCell setTextColor:[NSColor blackColor]];
+ /* We set the properties of unselected rows */
+ /* if built-in preset (defined by "type" == 0) we use a blue font */
+ if ([[userPresetDict objectForKey:@"Type"] intValue] == 0)
+ {
+ fontColor = [NSColor blueColor];
+ }
+ else // User created preset, use a black font
+ {
+ fontColor = [NSColor blackColor];
+ }
+ shadowColor = nil;
}
-
+ [aCell setTextColor:fontColor];
+ /* this shadow stuff (like mail app) for some reason looks crappy, commented out
+ temporarily in case we want to resurrect it */
+ /*
+ NSShadow *shadow = [[NSShadow alloc] init];
+ NSSize shadowOffset = { width: 1.0, height: -1.5};
+ [shadow setShadowOffset:shadowOffset];
+ [shadow setShadowColor:shadowColor];
+ [shadow set];
+ */
+
}
/* Method to display tooltip with the description for each preset, if available */
- (NSString *)tableView:(NSTableView *)aTableView toolTipForCell:(NSCell *)aCell