Chromium Code Reviews

Issue 2812026: Auto-size the views version of the options dialog. (Closed)

Created:
10 years, 6 months ago by Mattias Nissler (ping if slow)
Modified:
9 years, 7 months ago
Reviewers:
sky
CC:
chromium-reviews, finnur+watch_chromium.org, davemoore+watch_chromium.org, ben+cc_chromium.org, tfarina, Paweł Hajdan Jr.
Visibility:
Public.

Description

Auto-size the views version of the options dialog. This adds support for auto-sizing tab controls, adjusts the options dialog to use it and takes care of any fallout due to the new layout handling. Also fixes a couple of small bugs in the views Layout() machinery and sanitizes layouting of options pages. BUG=36497 TEST=unit tests in tabbed_pane_unittest.cc and grid_layout_unittest.cc, as well as checking the options dialog in any supported language. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=51526

Patch Set 1 #

Total comments: 46

Patch Set 2 : rebase, polish, unit tests #

Total comments: 29

Patch Set 3 : Rebase, address sky's comments. #

Patch Set 4 : Properly remove size constants for it and da. #

Patch Set 5 : Fix GtkWidget sizing. #

Total comments: 5

Patch Set 6 : Fix requisition read in TabContentsViewGtk, restore WidgetGtk::OnSizeRequest. #

Total comments: 3

Patch Set 7 : Handle size_request only for child windows, revert window sizing changes. #

Patch Set 8 : Fix autosizing issue with gtk pref pages in chromeos options dialog. #

Unified diffs Side-by-side diffs Stats (+456 lines, -298 lines)
M chrome/app/resources/locale_settings.grd View 1 chunk +0 lines, -12 lines 0 comments
M chrome/app/resources/locale_settings_am.xtb View 1 chunk +0 lines, -2 lines 0 comments
M chrome/app/resources/locale_settings_ar.xtb View 1 chunk +0 lines, -2 lines 0 comments
M chrome/app/resources/locale_settings_bg.xtb View 1 chunk +0 lines, -2 lines 0 comments
M chrome/app/resources/locale_settings_bn.xtb View 1 chunk +0 lines, -2 lines 0 comments
M chrome/app/resources/locale_settings_ca.xtb View 1 chunk +0 lines, -2 lines 0 comments
M chrome/app/resources/locale_settings_cs.xtb View 1 chunk +0 lines, -2 lines 0 comments
M chrome/app/resources/locale_settings_da.xtb View 1 chunk +0 lines, -7 lines 0 comments
M chrome/app/resources/locale_settings_de.xtb View 1 chunk +0 lines, -2 lines 0 comments
M chrome/app/resources/locale_settings_el.xtb View 1 chunk +0 lines, -2 lines 0 comments
M chrome/app/resources/locale_settings_en-GB.xtb View 1 chunk +0 lines, -2 lines 0 comments
M chrome/app/resources/locale_settings_es.xtb View 1 chunk +0 lines, -2 lines 0 comments
M chrome/app/resources/locale_settings_es-419.xtb View 1 chunk +0 lines, -2 lines 0 comments
M chrome/app/resources/locale_settings_et.xtb View 1 chunk +0 lines, -2 lines 0 comments
M chrome/app/resources/locale_settings_fi.xtb View 1 chunk +0 lines, -2 lines 0 comments
M chrome/app/resources/locale_settings_fil.xtb View 1 chunk +0 lines, -2 lines 0 comments
M chrome/app/resources/locale_settings_fr.xtb View 1 chunk +0 lines, -2 lines 0 comments
M chrome/app/resources/locale_settings_gu.xtb View 1 chunk +0 lines, -2 lines 0 comments
M chrome/app/resources/locale_settings_he.xtb View 1 chunk +0 lines, -2 lines 0 comments
M chrome/app/resources/locale_settings_hi.xtb View 1 chunk +0 lines, -2 lines 0 comments
M chrome/app/resources/locale_settings_hr.xtb View 1 chunk +0 lines, -2 lines 0 comments
M chrome/app/resources/locale_settings_hu.xtb View 1 chunk +0 lines, -2 lines 0 comments
M chrome/app/resources/locale_settings_id.xtb View 1 chunk +0 lines, -2 lines 0 comments
M chrome/app/resources/locale_settings_it.xtb View 1 chunk +0 lines, -7 lines 0 comments
M chrome/app/resources/locale_settings_ja.xtb View 1 chunk +0 lines, -2 lines 0 comments
M chrome/app/resources/locale_settings_kn.xtb View 1 chunk +0 lines, -2 lines 0 comments
M chrome/app/resources/locale_settings_ko.xtb View 1 chunk +0 lines, -2 lines 0 comments
M chrome/app/resources/locale_settings_lt.xtb View 1 chunk +0 lines, -2 lines 0 comments
M chrome/app/resources/locale_settings_lv.xtb View 1 chunk +0 lines, -2 lines 0 comments
M chrome/app/resources/locale_settings_ml.xtb View 1 chunk +0 lines, -2 lines 0 comments
M chrome/app/resources/locale_settings_mr.xtb View 1 chunk +0 lines, -2 lines 0 comments
M chrome/app/resources/locale_settings_nb.xtb View 1 chunk +0 lines, -2 lines 0 comments
M chrome/app/resources/locale_settings_nl.xtb View 1 chunk +0 lines, -2 lines 0 comments
M chrome/app/resources/locale_settings_or.xtb View 1 chunk +0 lines, -2 lines 0 comments
M chrome/app/resources/locale_settings_pl.xtb View 1 chunk +0 lines, -2 lines 0 comments
M chrome/app/resources/locale_settings_pt-BR.xtb View 1 chunk +0 lines, -2 lines 0 comments
M chrome/app/resources/locale_settings_pt-PT.xtb View 1 chunk +0 lines, -2 lines 0 comments
M chrome/app/resources/locale_settings_ro.xtb View 1 chunk +0 lines, -2 lines 0 comments
M chrome/app/resources/locale_settings_ru.xtb View 1 chunk +0 lines, -2 lines 0 comments
M chrome/app/resources/locale_settings_sk.xtb View 1 chunk +0 lines, -2 lines 0 comments
M chrome/app/resources/locale_settings_sl.xtb View 1 chunk +0 lines, -2 lines 0 comments
M chrome/app/resources/locale_settings_sr.xtb View 1 chunk +0 lines, -2 lines 0 comments
M chrome/app/resources/locale_settings_sv.xtb View 1 chunk +0 lines, -2 lines 0 comments
M chrome/app/resources/locale_settings_sw.xtb View 1 chunk +0 lines, -2 lines 0 comments
M chrome/app/resources/locale_settings_ta.xtb View 1 chunk +0 lines, -2 lines 0 comments
M chrome/app/resources/locale_settings_te.xtb View 1 chunk +0 lines, -2 lines 0 comments
M chrome/app/resources/locale_settings_th.xtb View 1 chunk +0 lines, -2 lines 0 comments
M chrome/app/resources/locale_settings_tr.xtb View 1 chunk +0 lines, -2 lines 0 comments
M chrome/app/resources/locale_settings_uk.xtb View 1 chunk +0 lines, -2 lines 0 comments
M chrome/app/resources/locale_settings_vi.xtb View 1 chunk +0 lines, -2 lines 0 comments
M chrome/app/resources/locale_settings_zh-CN.xtb View 1 chunk +0 lines, -2 lines 0 comments
M chrome/app/resources/locale_settings_zh-TW.xtb View 1 chunk +0 lines, -2 lines 0 comments
M chrome/browser/chromeos/options/options_window_view.cc View 4 chunks +54 lines, -19 lines 0 comments
M chrome/browser/views/options/advanced_contents_view.cc View 5 chunks +2 lines, -23 lines 0 comments
M chrome/browser/views/options/content_page_view.cc View 5 chunks +14 lines, -18 lines 0 comments
M chrome/browser/views/options/general_page_view.h View 1 chunk +0 lines, -3 lines 0 comments
M chrome/browser/views/options/general_page_view.cc View 6 chunks +17 lines, -25 lines 0 comments
M chrome/browser/views/options/options_window_view.cc View 1 chunk +3 lines, -3 lines 0 comments
M chrome/browser/views/tab_contents/tab_contents_view_gtk.cc View 1 chunk +4 lines, -2 lines 0 comments
M chrome/chrome_tests.gypi View 1 chunk +1 line, -0 lines 0 comments
M views/controls/button/native_button_win.h View 2 chunks +7 lines, -3 lines 0 comments
M views/controls/button/native_button_win.cc View 4 chunks +12 lines, -5 lines 0 comments
M views/controls/menu/menu_scroll_view_container.cc View 1 chunk +1 line, -0 lines 0 comments
M views/controls/native_control.cc View 1 chunk +1 line, -1 line 0 comments
M views/controls/scrollbar/native_scroll_bar_win.h View 3 chunks +7 lines, -3 lines 0 comments
M views/controls/scrollbar/native_scroll_bar_win.cc View 8 chunks +18 lines, -16 lines 0 comments
M views/controls/tabbed_pane/native_tabbed_pane_gtk.h View 2 chunks +2 lines, -1 line 0 comments
M views/controls/tabbed_pane/native_tabbed_pane_gtk.cc View 3 chunks +23 lines, -0 lines 0 comments
M views/controls/tabbed_pane/native_tabbed_pane_win.h View 4 chunks +6 lines, -1 line 0 comments
M views/controls/tabbed_pane/native_tabbed_pane_win.cc View 7 chunks +85 lines, -17 lines 0 comments
M views/controls/tabbed_pane/native_tabbed_pane_wrapper.h View 2 chunks +4 lines, -1 line 0 comments
M views/controls/tabbed_pane/tabbed_pane.h View 2 chunks +1 line, -1 line 0 comments
M views/controls/tabbed_pane/tabbed_pane.cc View 2 chunks +6 lines, -3 lines 0 comments
A views/controls/tabbed_pane/tabbed_pane_unittest.cc View 1 chunk +82 lines, -0 lines 0 comments
M views/controls/table/table_view.h View 2 chunks +4 lines, -4 lines 0 comments
M views/controls/table/table_view.cc View 3 chunks +10 lines, -4 lines 0 comments
M views/examples/tabbed_pane_example.h View 2 chunks +1 line, -2 lines 0 comments
M views/grid_layout.h View 1 chunk +1 line, -2 lines 0 comments
M views/grid_layout.cc View 2 chunks +13 lines, -10 lines 0 comments
M views/grid_layout_unittest.cc View 3 chunks +59 lines, -1 line 0 comments
M views/view.cc View 1 chunk +3 lines, -6 lines 0 comments
M views/widget/widget_gtk.h View 1 chunk +1 line, -0 lines 0 comments
M views/widget/widget_gtk.cc View 2 chunks +14 lines, -0 lines 0 comments

Messages

Total messages: 16 (0 generated)
Peter Kasting
You should have sky review this. He'd be a better reviewer. http://codereview.chromium.org/2812026/diff/1/3 File chrome/browser/views/options/advanced_contents_view.cc (left): ...
10 years, 6 months ago (2010-06-25 18:29:15 UTC) #1
Mattias Nissler (ping if slow)
Thanks for your feedback, Peter! I'll get this to sky after fixing up the loose ...
10 years, 5 months ago (2010-06-28 09:58:28 UTC) #2
tfarina
http://codereview.chromium.org/2812026/diff/1/2 File chrome/browser/chromeos/options/options_window_view.cc (right): http://codereview.chromium.org/2812026/diff/1/2#newcode52 chrome/browser/chromeos/options/options_window_view.cc:52: }; DISALLOW_COPY_AND_ASSIGN? http://codereview.chromium.org/2812026/diff/1/15 File views/controls/tabbed_pane/native_tabbed_pane_win.cc (right): http://codereview.chromium.org/2812026/diff/1/15#newcode72 views/controls/tabbed_pane/native_tabbed_pane_win.cc:72: for ...
10 years, 5 months ago (2010-06-28 13:36:49 UTC) #3
Mattias Nissler (ping if slow)
Thanks for your comments, Thiago! http://codereview.chromium.org/2812026/diff/1/2 File chrome/browser/chromeos/options/options_window_view.cc (right): http://codereview.chromium.org/2812026/diff/1/2#newcode52 chrome/browser/chromeos/options/options_window_view.cc:52: }; On 2010/06/28 13:36:49, ...
10 years, 5 months ago (2010-06-28 16:14:00 UTC) #4
Mattias Nissler (ping if slow)
Hi, Peter suggested you as a better reviewer for this CL, so would you mind?
10 years, 5 months ago (2010-06-28 16:20:28 UTC) #5
Peter Kasting
BTW, while I personally prefer ++i to i++, when |i| is an integral type there ...
10 years, 5 months ago (2010-06-28 17:40:00 UTC) #6
sky
http://codereview.chromium.org/2812026/diff/19001/20053 File chrome/browser/chromeos/options/options_window_view.cc (right): http://codereview.chromium.org/2812026/diff/19001/20053#newcode57 chrome/browser/chromeos/options/options_window_view.cc:57: : widget_(widget) { indent by 4. http://codereview.chromium.org/2812026/diff/19001/20053#newcode70 chrome/browser/chromeos/options/options_window_view.cc:70: GtkRequisition ...
10 years, 5 months ago (2010-06-28 17:40:07 UTC) #7
Mattias Nissler (ping if slow)
Thanks for your comments, here is an updated version. http://codereview.chromium.org/2812026/diff/19001/20053 File chrome/browser/chromeos/options/options_window_view.cc (right): http://codereview.chromium.org/2812026/diff/19001/20053#newcode57 chrome/browser/chromeos/options/options_window_view.cc:57: ...
10 years, 5 months ago (2010-06-29 11:26:03 UTC) #8
sky
http://codereview.chromium.org/2812026/diff/19001/20077 File views/grid_layout.cc (right): http://codereview.chromium.org/2812026/diff/19001/20077#newcode843 views/grid_layout.cc:843: pref->SetSize(std::max(0, width - left_inset_ - right_inset_), 0); On 2010/06/29 ...
10 years, 5 months ago (2010-06-29 15:40:38 UTC) #9
Mattias Nissler (ping if slow)
http://codereview.chromium.org/2812026/diff/24002/32081 File views/widget/widget_gtk.cc (right): http://codereview.chromium.org/2812026/diff/24002/32081#newcode583 views/widget/widget_gtk.cc:583: gtk_widget_set_size_request(widget_, bounds.width(), bounds.height()); On 2010/06/29 15:40:38, sky wrote: > ...
10 years, 5 months ago (2010-06-29 16:35:48 UTC) #10
Mattias Nissler (ping if slow)
I just uploaded an updated version. I think I've resolved all failing unit tests now, ...
10 years, 5 months ago (2010-06-30 11:54:21 UTC) #11
sky
http://codereview.chromium.org/2812026/diff/16002/39082 File views/widget/widget_gtk.cc (right): http://codereview.chromium.org/2812026/diff/16002/39082#newcode654 views/widget/widget_gtk.cc:654: bounds.width(), bounds.height()); I'm still worried about this part of ...
10 years, 5 months ago (2010-06-30 15:17:17 UTC) #12
Mattias Nissler (ping if slow)
http://codereview.chromium.org/2812026/diff/16002/39082 File views/widget/widget_gtk.cc (right): http://codereview.chromium.org/2812026/diff/16002/39082#newcode654 views/widget/widget_gtk.cc:654: bounds.width(), bounds.height()); On 2010/06/30 15:17:17, sky wrote: > I'm ...
10 years, 5 months ago (2010-06-30 17:21:44 UTC) #13
sky
http://codereview.chromium.org/2812026/diff/16002/39082 File views/widget/widget_gtk.cc (right): http://codereview.chromium.org/2812026/diff/16002/39082#newcode654 views/widget/widget_gtk.cc:654: bounds.width(), bounds.height()); On 2010/06/30 17:21:44, mnissler wrote: > On ...
10 years, 5 months ago (2010-06-30 17:40:15 UTC) #14
Mattias Nissler (ping if slow)
On 2010/06/30 17:40:15, sky wrote: > http://codereview.chromium.org/2812026/diff/16002/39082 > File views/widget/widget_gtk.cc (right): > > http://codereview.chromium.org/2812026/diff/16002/39082#newcode654 > ...
10 years, 5 months ago (2010-06-30 21:10:54 UTC) #15
sky
10 years, 5 months ago (2010-06-30 21:13:30 UTC) #16
What you've done is fine. LGTM

Powered by Google App Engine