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