Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: cappuccino/cappuccino
...
head fork: cappuccino/cappuccino
  • 3 commits
  • 2 files changed
  • 0 commit comments
  • 2 contributors
Commits on Jun 25, 2012
@Kentzo Kentzo Refs #1572. Fix highlighted status is not preserved.
When higlightsBy == CPNoCellMask and showsStateBy == CPChangeBackgroundCellMask
higlighted status must be preserved when a user switch state from Off to On.
913308d
@aljungberg aljungberg Formatting. a2787f8
@aljungberg aljungberg Refs #1572. Merge extra commit re highlights. c52315c
Showing with 36 additions and 31 deletions.
  1. +6 −1 AppKit/CPButton.j
  2. +30 −30 Tests/Manual/KeyEquivalents/AppController.j
View
7 AppKit/CPButton.j
@@ -529,7 +529,12 @@ CPButtonImageOffset = 3.0;
[self highlight:YES];
}
else
- [self highlight:NO];
+ {
+ if (_showsStateBy & (CPChangeGrayCellMask | CPChangeBackgroundCellMask))
+ [self highlight:[self state] != CPOffState];
+ else
+ [self highlight:NO];
+ }
return startedTracking;
}
View
60 Tests/Manual/KeyEquivalents/AppController.j
@@ -34,18 +34,18 @@
[contentView addSubview:label];
var keysToTest = [
- "a",
- ";",
- "-",
- "=",
- ",",
- ".",
- "/",
- "`",
- "'",
- "[",
- "\\",
- "]"
+ "a",
+ ";",
+ "-",
+ "=",
+ ",",
+ ".",
+ "/",
+ "`",
+ "'",
+ "[",
+ "\\",
+ "]"
];
for (var i = 0; i < keysToTest.length; i++)
@@ -69,23 +69,23 @@
[contentView addSubview:label];
var functionKeysToTest = [
- ["backspace", CPBackspaceCharacter],
- ["delete char", CPDeleteCharacter],
- ["delete key", CPDeleteFunctionKey],
- ["tab", CPTabCharacter],
- ["carriage return", CPCarriageReturnCharacter],
- ["newline", CPNewlineCharacter],
- ["space", CPSpaceFunctionKey],
- ["esc", CPEscapeFunctionKey],
- ["pgup", CPPageUpFunctionKey],
- ["pgdn", CPPageDownFunctionKey],
- ["left arrow", CPLeftArrowFunctionKey],
- ["up arrow", CPUpArrowFunctionKey],
- ["right arrow", CPRightArrowFunctionKey],
- ["down arrow", CPDownArrowFunctionKey],
- ["home", CPHomeFunctionKey],
- ["end", CPEndFunctionKey]
- ];
+ ["backspace", CPBackspaceCharacter],
+ ["delete char", CPDeleteCharacter],
+ ["delete key", CPDeleteFunctionKey],
+ ["tab", CPTabCharacter],
+ ["carriage return", CPCarriageReturnCharacter],
+ ["newline", CPNewlineCharacter],
+ ["space", CPSpaceFunctionKey],
+ ["esc", CPEscapeFunctionKey],
+ ["pgup", CPPageUpFunctionKey],
+ ["pgdn", CPPageDownFunctionKey],
+ ["left arrow", CPLeftArrowFunctionKey],
+ ["up arrow", CPUpArrowFunctionKey],
+ ["right arrow", CPRightArrowFunctionKey],
+ ["down arrow", CPDownArrowFunctionKey],
+ ["home", CPHomeFunctionKey],
+ ["end", CPEndFunctionKey]
+ ];
for (var i = 0, buttonsWide = 6, yOffset = 0; i < functionKeysToTest.length; i++)
{
@@ -120,7 +120,7 @@
@end
-@implementation TestButton :CPButton
+@implementation TestButton : CPButton
{
}

No commit comments for this range

Something went wrong with that request. Please try again.