| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 // | |
| 5 // A list of constants that are used in setting up GTK widgets. | |
| 6 // | |
| 7 // This contains named color constants, along with spacing constants from the | |
| 8 // GNOME Human Interface Guide. | |
| 9 | |
| 10 #ifndef UI_BASE_GTK_GTK_HIG_CONSTANTS_H_ | |
| 11 #define UI_BASE_GTK_GTK_HIG_CONSTANTS_H_ | |
| 12 #pragma once | |
| 13 | |
| 14 #include "ui/base/ui_export.h" | |
| 15 | |
| 16 typedef struct _GdkColor GdkColor; | |
| 17 | |
| 18 namespace ui { | |
| 19 | |
| 20 // Multiply uint8 color components by this. | |
| 21 const int kSkiaToGDKMultiplier = 257; | |
| 22 | |
| 23 // Named color constants. | |
| 24 UI_EXPORT extern const GdkColor kGdkWhite; | |
| 25 UI_EXPORT extern const GdkColor kGdkGray; | |
| 26 UI_EXPORT extern const GdkColor kGdkBlack; | |
| 27 UI_EXPORT extern const GdkColor kGdkGreen; | |
| 28 | |
| 29 // Constants relating to the layout of dialog windows: | |
| 30 // (See http://library.gnome.org/devel/hig-book/stable/design-window.html.en) | |
| 31 | |
| 32 // Spacing between controls of the same group. | |
| 33 const int kControlSpacing = 6; | |
| 34 | |
| 35 // Horizontal spacing between a label and its control. | |
| 36 const int kLabelSpacing = 12; | |
| 37 | |
| 38 // Indent of the controls within each group. | |
| 39 const int kGroupIndent = 12; | |
| 40 | |
| 41 // Space around the outside of a dialog's contents. | |
| 42 const int kContentAreaBorder = 12; | |
| 43 | |
| 44 // Spacing between groups of controls. | |
| 45 const int kContentAreaSpacing = 18; | |
| 46 | |
| 47 // Horizontal Spacing between controls in a form. | |
| 48 const int kFormControlSpacing = 10; | |
| 49 | |
| 50 } // namespace ui | |
| 51 | |
| 52 // Define a macro for creating GdkColors from RGB values. This is a macro to | |
| 53 // allow static construction of literals, etc. Use this like: | |
| 54 // GdkColor white = GDK_COLOR_RGB(0xff, 0xff, 0xff); | |
| 55 #define GDK_COLOR_RGB(r, g, b) {0, r * ::ui::kSkiaToGDKMultiplier, \ | |
| 56 g * ::ui::kSkiaToGDKMultiplier, b * ::ui::kSkiaToGDKMultiplier} | |
| 57 | |
| 58 #endif // UI_BASE_GTK_GTK_HIG_CONSTANTS_H_ | |
| OLD | NEW |