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
8bf1f86a
Commit
8bf1f86a
authored
Jul 20, 2015
by
Collin Jackson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
abarth feedback
parent
e3d5c2b2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
18 deletions
+22
-18
flex.dart
packages/flutter/lib/rendering/flex.dart
+22
-18
No files found.
packages/flutter/lib/rendering/flex.dart
View file @
8bf1f86a
...
...
@@ -439,24 +439,6 @@ class RenderFlex extends RenderBox with ContainerRenderObjectMixin<RenderBox, Fl
void
paint
(
PaintingCanvas
canvas
,
Offset
offset
)
{
if
(
_overflow
>
0
)
{
assert
(()
{
// Draw a red rectangle over the overflow area in debug mode
// You should be using a Clip if you want to clip your children
Paint
paint
=
new
Paint
()..
color
=
const
Color
(
0x7FFF0000
);
Rect
overflowRect
;
switch
(
direction
)
{
case
FlexDirection
.
horizontal
:
overflowRect
=
offset
+
new
Offset
(
size
.
width
,
0.0
)
&
new
Size
(
_overflow
,
size
.
height
);
break
;
case
FlexDirection
.
vertical
:
overflowRect
=
offset
+
new
Offset
(
0.0
,
size
.
height
)
&
new
Size
(
size
.
width
,
_overflow
);
break
;
}
canvas
.
drawRect
(
overflowRect
,
paint
);
return
true
;
});
canvas
.
save
();
canvas
.
clipRect
(
offset
&
size
);
defaultPaint
(
canvas
,
offset
);
...
...
@@ -465,4 +447,26 @@ class RenderFlex extends RenderBox with ContainerRenderObjectMixin<RenderBox, Fl
defaultPaint
(
canvas
,
offset
);
}
}
void
debugPaintSize
(
PaintingCanvas
canvas
,
Offset
offset
)
{
super
.
debugPaintSize
(
canvas
,
offset
);
if
(
_overflow
<=
0
)
return
;
// Draw a red rectangle over the overflow area in debug mode
// You should be using a Clip if you want to clip your children
Paint
paint
=
new
Paint
()..
color
=
const
Color
(
0x7FFF0000
);
Rect
overflowRect
;
switch
(
direction
)
{
case
FlexDirection
.
horizontal
:
overflowRect
=
offset
+
new
Offset
(
size
.
width
,
0.0
)
&
new
Size
(
_overflow
,
size
.
height
);
break
;
case
FlexDirection
.
vertical
:
overflowRect
=
offset
+
new
Offset
(
0.0
,
size
.
height
)
&
new
Size
(
size
.
width
,
_overflow
);
break
;
}
canvas
.
drawRect
(
overflowRect
,
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