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

Unified Diff: views/controls/tabbed_pane/tabbed_pane.cc

Issue 2812026: Auto-size the views version of the options dialog. (Closed)
Patch Set: Fix autosizing issue with gtk pref pages in chromeos options dialog. Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « views/controls/tabbed_pane/tabbed_pane.h ('k') | views/controls/tabbed_pane/tabbed_pane_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/controls/tabbed_pane/tabbed_pane.cc
diff --git a/views/controls/tabbed_pane/tabbed_pane.cc b/views/controls/tabbed_pane/tabbed_pane.cc
index 5cb570a881a5fd8e2b3712ef3046de3ebe5b148f..1a7b0f07df5e2ad02e5eeaeeb240bb35521b0cb6 100644
--- a/views/controls/tabbed_pane/tabbed_pane.cc
+++ b/views/controls/tabbed_pane/tabbed_pane.cc
@@ -102,10 +102,8 @@ void TabbedPane::LoadAccelerators() {
}
void TabbedPane::Layout() {
- if (native_tabbed_pane_) {
+ if (native_tabbed_pane_)
native_tabbed_pane_->GetView()->SetBounds(0, 0, width(), height());
- native_tabbed_pane_->GetView()->Layout();
- }
}
void TabbedPane::Focus() {
@@ -129,4 +127,9 @@ bool TabbedPane::GetAccessibleRole(AccessibilityTypes::Role* role) {
return true;
}
+gfx::Size TabbedPane::GetPreferredSize() {
+ return native_tabbed_pane_ ?
+ native_tabbed_pane_->GetPreferredSize() : gfx::Size();
+}
+
} // namespace views
« no previous file with comments | « views/controls/tabbed_pane/tabbed_pane.h ('k') | views/controls/tabbed_pane/tabbed_pane_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698