| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/gtk/options/options_layout_gtk.h" | 5 #include "chrome/browser/ui/gtk/options/options_layout_gtk.h" |
| 6 | 6 |
| 7 #include "chrome/browser/gtk/gtk_util.h" | 7 #include "chrome/browser/ui/gtk/gtk_util.h" |
| 8 | 8 |
| 9 // If the height of screen is equal or shorter than this, we will use | 9 // If the height of screen is equal or shorter than this, we will use |
| 10 // a more compact option layout. | 10 // a more compact option layout. |
| 11 const int kCompactScreenHeight = 600; | 11 const int kCompactScreenHeight = 600; |
| 12 | 12 |
| 13 // Default option layout builder follows GNOME HIG, which uses header and | 13 // Default option layout builder follows GNOME HIG, which uses header and |
| 14 // spacing to group options. | 14 // spacing to group options. |
| 15 class DefaultOptionsLayoutBuilderGtk : public OptionsLayoutBuilderGtk { | 15 class DefaultOptionsLayoutBuilderGtk : public OptionsLayoutBuilderGtk { |
| 16 public: | 16 public: |
| 17 explicit DefaultOptionsLayoutBuilderGtk(); | 17 explicit DefaultOptionsLayoutBuilderGtk(); |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 } | 116 } |
| 117 | 117 |
| 118 OptionsLayoutBuilderGtk* | 118 OptionsLayoutBuilderGtk* |
| 119 OptionsLayoutBuilderGtk::CreateOptionallyCompactLayout() { | 119 OptionsLayoutBuilderGtk::CreateOptionallyCompactLayout() { |
| 120 gint screen_height = gdk_screen_get_height(gdk_screen_get_default()); | 120 gint screen_height = gdk_screen_get_height(gdk_screen_get_default()); |
| 121 if (screen_height <= kCompactScreenHeight) | 121 if (screen_height <= kCompactScreenHeight) |
| 122 return new CompactOptionsLayoutBuilderGtk(); | 122 return new CompactOptionsLayoutBuilderGtk(); |
| 123 else | 123 else |
| 124 return new DefaultOptionsLayoutBuilderGtk(); | 124 return new DefaultOptionsLayoutBuilderGtk(); |
| 125 } | 125 } |
| OLD | NEW |