Use the scroll view test 1 background in test 2.

The background makes it easier to see the scrolling in action.
This commit is contained in:
Alexander Ljungberg
2011-10-27 12:52:12 +01:00
parent 98df7e1eb8
commit 65b1fb2bae
2 changed files with 7 additions and 4 deletions
+7 -4
View File
@@ -17,13 +17,16 @@
@outlet CPScrollView scrollView2;
@outlet CPView contentView2;
CPColor lightBackground;
}
- (void)awakeFromCib
{
[theWindow setFullPlatformWindow:YES];
[contentView setBackgroundColor:[CPColor colorWithHexString:@"f3f3f3"]];
lightBackground = [CPColor colorWithPatternImage:[[CPImage alloc] initWithContentsOfFile:[[CPBundle mainBundle] pathForResource:@"photo.jpg"]]];
[contentView setBackgroundColor:lightBackground];
[contentView setAutoresizingMask:CPViewWidthSizable];
[scrollView setDocumentView:contentView];
@@ -43,7 +46,7 @@
{
var style = [aSender title];
switch(style)
switch (style)
{
case "Default":
[scrollView setScrollerKnobStyle:CPScrollerKnobStyleDefault];
@@ -61,10 +64,10 @@
{
var style = [aSender title];
switch(style)
switch (style)
{
case "Light":
[[scrollView documentView] setBackgroundColor:[CPColor colorWithHexString:@"f3f3f3"]];
[[scrollView documentView] setBackgroundColor:lightBackground];
break;
case "Dark":
[[scrollView documentView] setBackgroundColor:[CPColor colorWithHexString:@"333"]];
Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB