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

Unified Diff: chrome/browser/gtk/options/options_layout_gtk.h

Issue 1969006: Fix 18949 on GTK ("Options" window does not fit a small display). (Closed) Base URL: git://git.chromium.org/chromium.git
Patch Set: Update based on evan's comments of patch set 4 and sync with trunk 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 | « chrome/browser/gtk/options/general_page_gtk.cc ('k') | chrome/browser/gtk/options/options_layout_gtk.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/gtk/options/options_layout_gtk.h
diff --git a/chrome/browser/gtk/options/options_layout_gtk.h b/chrome/browser/gtk/options/options_layout_gtk.h
index 0d397c047d6a7c987c3f75db00a3ea66c8bd71bd..96bbc8ba93409ab1c780f12168688077a02d6c08 100644
--- a/chrome/browser/gtk/options/options_layout_gtk.h
+++ b/chrome/browser/gtk/options/options_layout_gtk.h
@@ -12,28 +12,33 @@
class OptionsLayoutBuilderGtk {
public:
- explicit OptionsLayoutBuilderGtk();
-
GtkWidget* get_page_widget() {
return page_;
}
- // Adds an option group to the table. Handles layout and labels the group
- // with the given title. If expandable is true, the content widget will be
- // allowed to expand and fill any extra space when the dialog is resized.
- void AddOptionGroup(const std::string& title, GtkWidget* content,
- bool expandable);
+ // Adds an option group to the table. Handles layout and the placing of
+ // separators between groups. If expandable is true, the content widget will
+ // be allowed to expand and fill any extra space when the dialog is resized.
+ virtual void AddOptionGroup(const std::string& title, GtkWidget* content,
+ bool expandable) = 0;
// Adds a widget without title or special layout. If expandable is true, the
// content widget will be allowed to expand and fill any extra space when the
// dialog is resized.
- void AddWidget(GtkWidget* content, bool expandable);
+ virtual void AddWidget(GtkWidget* content, bool expandable) = 0;
+
+ // Creates a default option layout builder. The default layout builder
+ // follows the GNOME HIG.
+ static OptionsLayoutBuilderGtk* Create();
+
+ // Creates a compact option layout builder, if the screen is compact.
+ // Otherwise, creates a default one.
+ static OptionsLayoutBuilderGtk* CreateOptionallyCompactLayout();
- private:
+ protected:
// The parent widget
GtkWidget* page_;
- DISALLOW_COPY_AND_ASSIGN(OptionsLayoutBuilderGtk);
};
#endif // CHROME_BROWSER_GTK_OPTIONS_OPTIONS_LAYOUT_GTK_H_
« no previous file with comments | « chrome/browser/gtk/options/general_page_gtk.cc ('k') | chrome/browser/gtk/options/options_layout_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698