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

Issue 284753002: Add main axis alignment for BoxLayout. (Closed)

Created:
6 years, 7 months ago by calamity
Modified:
6 years, 7 months ago
Reviewers:
benwells, sky
CC:
chromium-reviews, tfarina, chrome-apps-syd-reviews_chromium.org
Visibility:
Public.

Description

Add main axis alignment for BoxLayout. This CL adds a MainAxisAlignment setting to BoxLayout which functions like the CSS justify-content property. This property aligns the children items of a view in the orientation axis of the BoxLayout. set_spread_blank_space has been removed and replaced with MAIN_AXIS_ALIGNMENT_FILL. BUG=None Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=270934

Patch Set 1 : #

Total comments: 8

Patch Set 2 : address comments #

Patch Set 3 : Add TODOs #

Total comments: 2

Patch Set 4 : fix nit, factor out a few more variables #

Total comments: 14

Patch Set 5 : address comments #

Patch Set 6 : remove set_spread_blank_space, rename to MainAxisAlignment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+192 lines, -35 lines) Patch
M ash/system/chromeos/network/network_state_list_detailed_view.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M ash/system/tray/system_tray_bubble.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M ash/system/tray/tray_background_view.cc View 1 2 3 4 5 2 chunks +2 lines, -2 lines 0 comments Download
M ash/system/tray_accessibility.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/autofill/password_generation_popup_view_views.cc View 1 2 3 4 5 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/ui/views/message_center/message_center_widget_delegate.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M ui/message_center/views/message_center_view.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M ui/views/bubble/tray_bubble_view.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M ui/views/layout/box_layout.h View 1 2 3 4 5 5 chunks +33 lines, -5 lines 0 comments Download
M ui/views/layout/box_layout.cc View 1 2 3 4 5 3 chunks +58 lines, -19 lines 0 comments Download
M ui/views/layout/box_layout_unittest.cc View 1 2 3 4 5 3 chunks +91 lines, -2 lines 0 comments Download

Messages

Total messages: 13 (0 generated)
calamity
6 years, 7 months ago (2014-05-13 01:46:47 UTC) #1
benwells
https://codereview.chromium.org/284753002/diff/40001/ui/views/layout/box_layout.cc File ui/views/layout/box_layout.cc (right): https://codereview.chromium.org/284753002/diff/40001/ui/views/layout/box_layout.cc#newcode55 ui/views/layout/box_layout.cc:55: padding = (child_area.width() - total) / visible; I think ...
6 years, 7 months ago (2014-05-13 02:48:05 UTC) #2
calamity
+sky for OWNERS. I also added a couple of TODOs for additional capabilities that could ...
6 years, 7 months ago (2014-05-13 04:29:29 UTC) #3
benwells
lgtm https://codereview.chromium.org/284753002/diff/80001/ui/views/layout/box_layout.cc File ui/views/layout/box_layout.cc (right): https://codereview.chromium.org/284753002/diff/80001/ui/views/layout/box_layout.cc#newcode64 ui/views/layout/box_layout.cc:64: (MainAxisSize(new_child_area) - total_main_axis_size) / 2); Nit: a variable: ...
6 years, 7 months ago (2014-05-13 04:44:21 UTC) #4
calamity
https://codereview.chromium.org/284753002/diff/80001/ui/views/layout/box_layout.cc File ui/views/layout/box_layout.cc (right): https://codereview.chromium.org/284753002/diff/80001/ui/views/layout/box_layout.cc#newcode64 ui/views/layout/box_layout.cc:64: (MainAxisSize(new_child_area) - total_main_axis_size) / 2); On 2014/05/13 04:44:21, benwells ...
6 years, 7 months ago (2014-05-13 05:04:06 UTC) #5
sky
https://codereview.chromium.org/284753002/diff/110001/ui/views/layout/box_layout.cc File ui/views/layout/box_layout.cc (right): https://codereview.chromium.org/284753002/diff/110001/ui/views/layout/box_layout.cc#newcode37 ui/views/layout/box_layout.cc:37: int visible = 0; visible -> num_visible or visible_count ...
6 years, 7 months ago (2014-05-13 16:24:58 UTC) #6
calamity
https://codereview.chromium.org/284753002/diff/110001/ui/views/layout/box_layout.cc File ui/views/layout/box_layout.cc (right): https://codereview.chromium.org/284753002/diff/110001/ui/views/layout/box_layout.cc#newcode37 ui/views/layout/box_layout.cc:37: int visible = 0; On 2014/05/13 16:24:59, sky wrote: ...
6 years, 7 months ago (2014-05-14 02:03:21 UTC) #7
sky
https://codereview.chromium.org/284753002/diff/110001/ui/views/layout/box_layout.cc File ui/views/layout/box_layout.cc (right): https://codereview.chromium.org/284753002/diff/110001/ui/views/layout/box_layout.cc#newcode56 ui/views/layout/box_layout.cc:56: padding = free_space / visible; On 2014/05/14 02:03:27, calamity ...
6 years, 7 months ago (2014-05-14 18:13:40 UTC) #8
calamity
https://codereview.chromium.org/284753002/diff/110001/ui/views/layout/box_layout.cc File ui/views/layout/box_layout.cc (right): https://codereview.chromium.org/284753002/diff/110001/ui/views/layout/box_layout.cc#newcode56 ui/views/layout/box_layout.cc:56: padding = free_space / visible; On 2014/05/14 18:13:40, sky ...
6 years, 7 months ago (2014-05-15 02:51:07 UTC) #9
sky
LGTM
6 years, 7 months ago (2014-05-15 16:30:16 UTC) #10
calamity
The CQ bit was checked by calamity@chromium.org
6 years, 7 months ago (2014-05-16 01:52:23 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/calamity@chromium.org/284753002/170001
6 years, 7 months ago (2014-05-16 01:53:14 UTC) #12
commit-bot: I haz the power
6 years, 7 months ago (2014-05-16 05:21:18 UTC) #13
Message was sent while issue was closed.
Change committed as 270934

Powered by Google App Engine
This is Rietveld 408576698