Permalink
Browse files

Much better all around...

  • Loading branch information...
1 parent 1d2ceb6 commit b8382c92785f193c21484ff322ba138b65996e55 @ialexi ialexi committed Apr 17, 2010
View
@@ -3,7 +3,7 @@
// Copyright: ©2010 My Company, Inc.
// ==========================================================================
/*globals Hedwig */
-SC.LOG_TOUCH_EVENTS = YES;
+
/** @namespace
My cool new app. Describe your application.
@@ -43,11 +43,10 @@ Hedwig.mainPage = SC.Page.design({
// update master hidden status since we are doing this manually...
masterIsHidden: NO,
masterIsHiddenDidChange: function() {
- console.error("MHDC");
this.topToolbar.set("masterIsHidden", this.get("masterIsHidden"));
}.observes("masterIsHidden"),
- topToolbar: SC.ToolbarView.design(SC.Animatable, SC.FlowedLayout, {
+ topToolbar: SC.ToolbarView.design(SC.Animatable, {
masterIsHidden: NO,
layout: { top: 0, right: 0, left: 0, height: 44 },
@@ -80,27 +79,25 @@ Hedwig.mainPage = SC.Page.design({
}.observes("isShowing"),
autoResize: NO,
- flowPadding: {top:0,bottom:0,right:10,left:10},
- childViews: "title previous guide space next".w(),
+ childViews: "title previous guide next".w(),
previous: SC.ButtonView.design({
- layout: { width: 44, height: 44 },
+ layout: { left: 10, top: 0, width: 44, height: 44 },
theme: "icon",
icon: "previous",
isEnabled: NO,
isEnabledBinding: "Hedwig.guideBrowserController.hasPreviousArticle",
action: "previousArticle"
}),
guide: SC.ButtonView.design({
- layout: { width: 100, height: 44 },
+ layout: { left: 64, width: 100, height: 44 },
title: "Guide",
theme: "chromeless",
isVisible: NO,
action: "toggleMasterPicker",
isVisibleBinding: ".parentView.masterIsHidden"
}),
- space: SC.View.design({ isSpacer:YES }),
next: SC.ButtonView.design({
- layout: { width: 44, height: 44 },
+ layout: { right: 10, top: 0, width: 44, height: 44 },
theme: "icon",
icon: "next",
action: "nextArticle",
@@ -127,11 +124,11 @@ Hedwig.mainPage = SC.Page.design({
"tap": { minX: 0, maxX: 3 },
"drag": {minX: 5, maxX: 20},
"swipe": { minX: 20 },
- "RELEASE": { minY: 10 }
+ "RELEASE": { minY: 20 }
},
captureTouch: function() {
- return NO;
+ return YES;
},
/**
@@ -181,9 +178,27 @@ Hedwig.mainPage = SC.Page.design({
return YES;
},
+ touchesDragged: function(evt, touches) {
+ touches.forEach(function(touch){
+ var couldBe = this.mapTouch(touch);
+ if (couldBe.RELEASE) {
+ touch.captureTouch(this, YES);
+ }
+ }, this);
+ },
+
touchEnd: function(touch) {
var couldBe = this.mapTouch(touch);
- if (couldBe.tap) this.tap();
+ if (couldBe.tap) {
+ // first, try to see if anyone else wants it
+ touch.captureTouch(this, YES);
+
+ if (touch.touchResponder && touch.touchResponder !== this) touch.end();
+ if (touch.touchResponder === this || !touch.touchResponder) {
+ // otherwise, do what we want
+ this.tap();
+ }
+ }
},
tap: function() {
@@ -17,7 +17,6 @@ Hedwig.NORMAL = SC.Responder.create({
},
toggleToolbar: function() {
- console.error("T");
Hedwig.articleController.toggleToolbar();
}
});
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -3,6 +3,14 @@
border: 1px solid gray;
}
-h1 {
- color: rgb(70,70,140);
-}
+@view(sc-static-content-view) {
+ font-size: 1.2em;
+ h1 {
+ font-size: 1.5em;
+ }
+
+
+ h1, h2, h3, h4 {
+ color: rgb(80,120,170);
+ }
+}
@@ -3,7 +3,7 @@
@view(sc-view).paper-view {
z-index: 1;
background: white;
- -webkit-box-shadow: 0px 0px 13px rgba(0,0,0,.5);
+ -webkit-box-shadow: 0px 0px 13px rgba(0,0,0,.9);
}
@view(sc-toolbar-view) {
@@ -2,17 +2,21 @@
@view(sc-button-view) label.sc-button-label {
margin-top: -11px;
font-size: 16px;
- color: #bbb;
+ color: #999;
}
@view(sc-button-view).active label.sc-button-label {
- color: #777;
+ color: #555;
}
@end
@theme(icon)
+@view(sc-button-view).disabled {
+ opacity: .2;
+}
+
@view(sc-button-view) {
- opacity: .3;
+ opacity: .5;
}
@view(sc-button-view).active {
@@ -1,4 +1,4 @@
@view(sc-toolbar-view) .sc-label-view {
font-size: 20px;
- color: #aaa;
+ color: #777;
}
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -5,10 +5,25 @@
}
@view(sc-collection-view.sc-list-view.sc-source-list) .sc-list-item-view label {
- color: rgb(100,100,100);
+ color: rgb(255,255,255);
+ text-shadow: 0px -1px 1px rgba(0,0,0,.5);
font-size: 16px;
}
+@view(sc-collection-view.sc-list-view.sc-source-list) .sc-list-item-view.sc-group-item label {
+ color: rgb(240,240,240);
+}
+
+@view(sc-collection-view.sc-list-view.sc-source-list) .sc-list-item-view.sel {
+ border-top: 0px solid black;
+ background: rgb(0,0,0);
+ border-bottom: 0px solid black;
+}
+
+@view(sc-collection-view.sc-list-view.sc-source-list) .sc-list-item-view.sel {
+ background: rgba(0,0,0,0.4);
+}
+
@view(sc-collection-view.sc-list-view.sc-source-list) .sc-list-item-view.sel label {
color: white;
font-weight: normal;

0 comments on commit b8382c9

Please sign in to comment.