Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
8417fb62
Commit
8417fb62
authored
Aug 11, 2015
by
Eric Seidel
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #571 from eseidelGoogle/splash
Attempt to make our splashes closer to other Android apps
parents
5bbf0d89
cd5715bb
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
28 deletions
+33
-28
stock_row.dart
examples/stocks/lib/stock_row.dart
+19
-21
theme_data.dart
packages/flutter/lib/theme/theme_data.dart
+9
-2
ink_well.dart
packages/flutter/lib/widgets/ink_well.dart
+5
-5
No files found.
examples/stocks/lib/stock_row.dart
View file @
8417fb62
...
...
@@ -38,29 +38,27 @@ class StockRow extends Component {
];
// TODO(hansmuller): An explicit |height| shouldn't be needed
return
new
InkWell
(
child:
new
Container
(
padding:
const
EdgeDims
(
16.0
,
16.0
,
20.0
,
16.0
),
height:
kHeight
,
decoration:
new
BoxDecoration
(
border:
new
Border
(
bottom:
new
BorderSide
(
color:
Theme
.
of
(
this
).
dividerColor
)
)
return
new
Container
(
padding:
const
EdgeDims
(
16.0
,
16.0
,
20.0
,
16.0
),
height:
kHeight
,
decoration:
new
BoxDecoration
(
border:
new
Border
(
bottom:
new
BorderSide
(
color:
Theme
.
of
(
this
).
dividerColor
)
)
),
child:
new
Flex
([
new
Container
(
child:
new
StockArrow
(
percentChange:
stock
.
percentChange
),
margin:
const
EdgeDims
.
only
(
right:
5.0
)
),
child:
new
Flex
([
new
Container
(
child:
new
StockArrow
(
percentChange:
stock
.
percentChange
),
margin:
const
EdgeDims
.
only
(
right:
5.0
)
),
new
Flexible
(
child:
new
Flex
(
children
,
alignItems:
FlexAlignItems
.
baseline
,
textBaseline:
DefaultTextStyle
.
of
(
this
).
textBaseline
)
new
Flexible
(
child:
new
Flex
(
children
,
alignItems:
FlexAlignItems
.
baseline
,
textBaseline:
DefaultTextStyle
.
of
(
this
).
textBaseline
)
]
)
)
)
]
)
);
}
}
packages/flutter/lib/theme/theme_data.dart
View file @
8417fb62
...
...
@@ -26,8 +26,15 @@ class ThemeData {
// Some users want the pre-multiplied color, others just want the opacity.
hintColor
=
brightness
==
ThemeBrightness
.
dark
?
const
Color
(
0x42FFFFFF
)
:
const
Color
(
0x4C000000
),
hintOpacity
=
brightness
==
ThemeBrightness
.
dark
?
0.26
:
0.30
,
highlightColor
=
const
Color
(
0x66999999
),
selectedColor
=
const
Color
(
0x33999999
),
// TODO(eseidel): Where are highlight and selected colors documented?
// I flipped highlight/selected to match the News app (which is clearly not quite Material)
// Gmail has an interesting behavior of showing selected darker until
// you click on a different drawer item when the first one loses its
// selected color and becomes lighter, the ink then fills to make the new
// click dark to match the previous (resting) selected state. States
// revert when you cancel the tap.
highlightColor
=
const
Color
(
0x33999999
),
selectedColor
=
const
Color
(
0x66999999
),
text
=
brightness
==
ThemeBrightness
.
dark
?
typography
.
white
:
typography
.
black
{
assert
(
brightness
!=
null
);
...
...
packages/flutter/lib/widgets/ink_well.dart
View file @
8417fb62
...
...
@@ -13,11 +13,11 @@ import 'package:sky/rendering/object.dart';
import
'package:sky/widgets/basic.dart'
;
import
'package:sky/widgets/framework.dart'
;
const
int
_kSplashInitialOpacity
=
0x
8
0
;
const
double
_kSplashCancelledVelocity
=
0.
3
;
const
double
_kSplashConfirmedVelocity
=
0.
3
;
const
int
_kSplashInitialOpacity
=
0x
3
0
;
const
double
_kSplashCancelledVelocity
=
0.
7
;
const
double
_kSplashConfirmedVelocity
=
0.
7
;
const
double
_kSplashInitialSize
=
0.0
;
const
double
_kSplashUnconfirmedVelocity
=
0.
1
;
const
double
_kSplashUnconfirmedVelocity
=
0.
2
;
double
_getSplashTargetSize
(
Size
bounds
,
Point
position
)
{
double
d1
=
(
position
-
bounds
.
topLeft
(
Point
.
origin
)).
distance
;
...
...
@@ -72,7 +72,7 @@ class InkSplash {
}
void
paint
(
PaintingCanvas
canvas
)
{
int
opacity
=
(
_kSplashInitialOpacity
*
(
1.
0
-
(
_radius
.
value
/
_targetRadius
))).
floor
();
int
opacity
=
(
_kSplashInitialOpacity
*
(
1.
1
-
(
_radius
.
value
/
_targetRadius
))).
floor
();
sky
.
Paint
paint
=
new
sky
.
Paint
()..
color
=
new
sky
.
Color
(
opacity
<<
24
);
double
radius
=
_pinnedRadius
==
null
?
_radius
.
value
:
_pinnedRadius
;
canvas
.
drawCircle
(
position
,
radius
,
paint
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment