mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-08-25 04:57:03 +00:00
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:
@@ -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 |
Reference in New Issue
Block a user