Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(34)

Unified Diff: sky/sdk/lib/framework/components2/input.dart

Issue 1163973005: Start making input work (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/sdk/BUILD.gn ('k') | sky/sdk/lib/framework/editing2/editable_string.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/sdk/lib/framework/components2/input.dart
diff --git a/sky/sdk/lib/framework/components2/input.dart b/sky/sdk/lib/framework/components2/input.dart
index eba94a3abbab29433ada05d3843153c101c011a2..68a1018810d8869abd4c0b1c9084e3e7e567b269 100644
--- a/sky/sdk/lib/framework/components2/input.dart
+++ b/sky/sdk/lib/framework/components2/input.dart
@@ -2,38 +2,39 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-import '../editing/editable_string.dart';
-import '../editing/editable_text.dart';
-import '../editing/keyboard.dart';
+import '../editing2/editable_string.dart';
+import '../editing2/editable_text.dart';
+import '../editing2/keyboard.dart';
import '../fn2.dart';
-import '../theme/colors.dart';
-import '../theme/typography.dart' as typography;
+import '../theme2/colors.dart';
+import '../theme2/typography.dart' as typography;
+import '../rendering/flex.dart';
import 'dart:sky' as sky;
typedef void ValueChanged(value);
class Input extends Component {
- static final Style _style = new Style('''
- transform: translateX(0);
- margin: 8px;
- padding: 8px;
- border-bottom: 1px solid ${Grey[200]};
- align-self: center;
- height: 1.2em;
- white-space: pre;
- overflow: hidden;'''
- );
+ // static final Style _style = new Style('''
+ // transform: translateX(0);
+ // margin: 8px;
+ // padding: 8px;
+ // border-bottom: 1px solid ${Grey[200]};
+ // align-self: center;
+ // height: 1.2em;
+ // white-space: pre;
+ // overflow: hidden;'''
+ // );
- static final Style _placeholderStyle = new Style('''
- top: 8px;
- left: 8px;
- position: absolute;
- ${typography.black.caption};'''
- );
+ // static final Style _placeholderStyle = new Style('''
+ // top: 8px;
+ // left: 8px;
+ // position: absolute;
+ // ${typography.black.caption};'''
+ // );
- static final String _focusedInlineStyle = '''
- padding: 7px;
- border-bottom: 2px solid ${Blue[500]};''';
+ // static final String _focusedInlineStyle = '''
+ // padding: 7px;
+ // border-bottom: 2px solid ${Blue[500]};''';
ValueChanged onChanged;
String placeholder;
@@ -75,8 +76,8 @@ class Input extends Component {
if (placeholder != null && _value.isEmpty) {
children.add(new Container(
- style: _placeholderStyle,
- children: [new Text(placeholder)]
+ // style: _placeholderStyle,
+ child: new Text(placeholder)
));
}
@@ -85,8 +86,8 @@ class Input extends Component {
return new EventListenerNode(
new FlexContainer(
direction: FlexDirection.vertical,
- style: _style,
- inlineStyle: focused ? _focusedInlineStyle : null,
+ // style: _style,
+ // inlineStyle: focused ? _focusedInlineStyle : null,
children: children
),
onPointerDown: (sky.Event e) => keyboard.showByRequest()
« no previous file with comments | « sky/sdk/BUILD.gn ('k') | sky/sdk/lib/framework/editing2/editable_string.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698