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
a46e3377
Commit
a46e3377
authored
Jul 28, 2016
by
Hans Muller
Committed by
GitHub
Jul 28, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
AppBar: pad toolbars not tab bars (#5124)
parent
b11b2a1d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
app_bar.dart
packages/flutter/lib/src/material/app_bar.dart
+8
-7
No files found.
packages/flutter/lib/src/material/app_bar.dart
View file @
a46e3377
...
...
@@ -41,7 +41,8 @@ abstract class AppBarBottomWidget extends Widget {
/// The AppBar displays the toolbar widgets, [leading], [title], and
/// [actions], above the [bottom] (if any). If a [flexibleSpace] widget is
/// specified then it is stacked behind the toolbar and the bottom widget.
/// The [Scaffold] typically creates the appbar with an initial height equal to
///
/// The [Scaffold] typically creates the app bar with an initial height equal to
/// [expandedHeight]. If the [Scaffold.appBarBehavior] is set then the
/// AppBar's [collapsedHeight] and [bottomHeight] define how small the app bar
/// will become when the application is scrolled.
...
...
@@ -288,7 +289,10 @@ class AppBar extends StatelessWidget {
if
(
actions
!=
null
)
toolBarRow
.
addAll
(
actions
);
Widget
toolBar
=
new
Row
(
children:
toolBarRow
);
Widget
toolBar
=
new
Padding
(
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
8.0
),
child:
new
Row
(
children:
toolBarRow
)
);
if
(
effectiveCenterTitle
&&
centerWidget
!=
null
)
{
toolBar
=
new
Stack
(
...
...
@@ -330,18 +334,15 @@ class AppBar extends StatelessWidget {
// The padding applies to the toolbar and tabbar, not the flexible space.
// The incoming padding parameter's top value typically equals the height
// of the status bar - so that the toolbar appears below the status bar.
EdgeInsets
combinedPadding
=
new
EdgeInsets
.
symmetric
(
horizontal:
8.0
);
if
(
padding
!=
null
)
combinedPadding
+=
padding
;
appBar
=
new
Padding
(
padding:
combinedP
adding
,
padding:
p
adding
,
child:
appBar
);
// If the appBar's height shrinks below collapsedHeight, it will be clipped and bottom
// justified. This is so that the toolbar and the tabbar appear to move upwards as
// the appBar's height is reduced below collapsedHeight.
final
double
paddedCollapsedHeight
=
collapsedHeight
+
combinedPadding
.
top
+
combinedP
adding
.
bottom
;
final
double
paddedCollapsedHeight
=
collapsedHeight
+
padding
.
top
+
p
adding
.
bottom
;
if
(
size
.
height
<
paddedCollapsedHeight
)
{
appBar
=
new
ClipRect
(
child:
new
OverflowBox
(
...
...
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