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