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
c014fd37
Commit
c014fd37
authored
Dec 05, 2015
by
Adam Barth
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #763 from abarth/popup_splash
Popup menu splash doesn't go to edge
parents
503218cd
e7c05e57
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
40 deletions
+31
-40
material.dart
packages/flutter/lib/material.dart
+0
-1
popup_menu.dart
packages/flutter/lib/src/material/popup_menu.dart
+31
-5
popup_menu_item.dart
packages/flutter/lib/src/material/popup_menu_item.dart
+0
-34
No files found.
packages/flutter/lib/material.dart
View file @
c014fd37
...
...
@@ -37,7 +37,6 @@ export 'src/material/material_button.dart';
export
'src/material/material_list.dart'
;
export
'src/material/page.dart'
;
export
'src/material/popup_menu.dart'
;
export
'src/material/popup_menu_item.dart'
;
export
'src/material/progress_indicator.dart'
;
export
'src/material/radio.dart'
;
export
'src/material/raised_button.dart'
;
...
...
packages/flutter/lib/src/material/popup_menu.dart
View file @
c014fd37
...
...
@@ -9,15 +9,42 @@ import 'package:flutter/widgets.dart';
import
'ink_well.dart'
;
import
'material.dart'
;
import
'
popup_menu_item
.dart'
;
import
'
theme
.dart'
;
const
Duration
_kMenuDuration
=
const
Duration
(
milliseconds:
300
);
const
double
_kBaselineOffsetFromBottom
=
20.0
;
const
double
_kMenuCloseIntervalEnd
=
2.0
/
3.0
;
const
double
_kMenuWidthStep
=
56.0
;
const
double
_kMenuMinWidth
=
2.0
*
_kMenuWidthStep
;
const
double
_kMenuMaxWidth
=
5.0
*
_kMenuWidthStep
;
const
double
_kMenuHorizontalPadding
=
16.0
;
const
double
_kMenuItemHeight
=
48.0
;
const
double
_kMenuMaxWidth
=
5.0
*
_kMenuWidthStep
;
const
double
_kMenuMinWidth
=
2.0
*
_kMenuWidthStep
;
const
double
_kMenuVerticalPadding
=
8.0
;
const
double
_kMenuWidthStep
=
56.0
;
class
PopupMenuItem
<
T
>
extends
StatelessComponent
{
PopupMenuItem
({
Key
key
,
this
.
value
,
this
.
child
})
:
super
(
key:
key
);
final
Widget
child
;
final
T
value
;
Widget
build
(
BuildContext
context
)
{
return
new
Container
(
height:
_kMenuItemHeight
,
padding:
const
EdgeDims
.
symmetric
(
horizontal:
_kMenuHorizontalPadding
),
child:
new
DefaultTextStyle
(
style:
Theme
.
of
(
context
).
text
.
subhead
,
child:
new
Baseline
(
baseline:
_kMenuItemHeight
-
_kBaselineOffsetFromBottom
,
child:
child
)
)
);
}
}
class
_PopupMenu
<
T
>
extends
StatelessComponent
{
_PopupMenu
({
...
...
@@ -71,7 +98,6 @@ class _PopupMenu<T> extends StatelessComponent {
child:
new
Block
(
children
,
padding:
const
EdgeDims
.
symmetric
(
horizontal:
_kMenuHorizontalPadding
,
vertical:
_kMenuVerticalPadding
)
)
...
...
packages/flutter/lib/src/material/popup_menu_item.dart
deleted
100644 → 0
View file @
503218cd
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import
'package:flutter/widgets.dart'
;
import
'theme.dart'
;
const
double
_kMenuItemHeight
=
48.0
;
const
double
_kBaselineOffsetFromBottom
=
20.0
;
class
PopupMenuItem
<
T
>
extends
StatelessComponent
{
PopupMenuItem
({
Key
key
,
this
.
value
,
this
.
child
})
:
super
(
key:
key
);
final
Widget
child
;
final
T
value
;
Widget
build
(
BuildContext
context
)
{
return
new
Container
(
height:
_kMenuItemHeight
,
child:
new
DefaultTextStyle
(
style:
Theme
.
of
(
context
).
text
.
subhead
,
child:
new
Baseline
(
baseline:
_kMenuItemHeight
-
_kBaselineOffsetFromBottom
,
child:
child
)
)
);
}
}
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