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

Side by Side Diff: chrome/browser/ui/libgtk2ui/chrome_gtk_frame.cc

Issue 2449243002: Gtk3 ui: Add libgtk3ui as a separate build component (Closed)
Patch Set: Add theme_properties dep to //chrome/browser/ui Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
(Empty)
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.
4
5 #include "chrome/browser/ui/libgtk2ui/chrome_gtk_frame.h"
6
7 G_GNUC_BEGIN_IGNORE_DEPRECATIONS
8
9 G_BEGIN_DECLS
10
11 // MetaFrames declaration
12 G_DEFINE_TYPE(MetaFrames, meta_frames, GTK_TYPE_WINDOW)
13
14 static void meta_frames_class_init(MetaFramesClass* frames_class) {
15 // Noop since we don't declare anything.
16 }
17
18 static void meta_frames_init(MetaFrames* button) {
19 }
20
21
22 // ChromeGtkFrame declaration
23 G_DEFINE_TYPE(ChromeGtkFrame, chrome_gtk_frame, meta_frames_get_type())
24
25 static void chrome_gtk_frame_class_init(ChromeGtkFrameClass* frame_class) {
26 GtkWidgetClass* widget_class = reinterpret_cast<GtkWidgetClass*>(frame_class);
27
28 // Frame tints:
29 gtk_widget_class_install_style_property(
30 widget_class,
31 g_param_spec_boxed(
32 "frame-color",
33 "Frame Color",
34 "The color that the chrome frame will be. (If unspecified, "
35 " Chrome will take ChromeGtkFrame::bg[SELECTED] and slightly darken"
36 " it.)",
37 GDK_TYPE_COLOR,
38 G_PARAM_READABLE));
39 gtk_widget_class_install_style_property(
40 widget_class,
41 g_param_spec_boxed(
42 "inactive-frame-color",
43 "Inactive Frame Color",
44 "The color that the inactive chrome frame will be. (If"
45 " unspecified, Chrome will take ChromeGtkFrame::bg[INSENSITIVE]"
46 " and slightly darken it.)",
47 GDK_TYPE_COLOR,
48 G_PARAM_READABLE));
49 gtk_widget_class_install_style_property(
50 widget_class,
51 g_param_spec_boxed(
52 "incognito-frame-color",
53 "Incognito Frame Color",
54 "The color that the incognito frame will be. (If unspecified,"
55 " Chrome will take the frame color and tint it by Chrome's default"
56 " incognito tint.)",
57 GDK_TYPE_COLOR,
58 G_PARAM_READABLE));
59 gtk_widget_class_install_style_property(
60 widget_class,
61 g_param_spec_boxed(
62 "incognito-inactive-frame-color",
63 "Incognito Inactive Frame Color",
64 "The color that the inactive incognito frame will be. (If"
65 " unspecified, Chrome will take the frame color and tint it by"
66 " Chrome's default incognito tint.)",
67 GDK_TYPE_COLOR,
68 G_PARAM_READABLE));
69
70 // Frame gradient control:
71 gtk_widget_class_install_style_property(
72 widget_class,
73 g_param_spec_int(
74 "frame-gradient-size",
75 "Chrome Frame Gradient Size",
76 "The size of the gradient on top of the frame image. Specify 0 to"
77 " make the frame a solid color.",
78 0, // 0 disables the gradient
79 128, // The frame image is only up to 128 pixels tall.
80 16, // By default, gradients are 16 pixels high.
81 G_PARAM_READABLE));
82 gtk_widget_class_install_style_property(
83 widget_class,
84 g_param_spec_boxed(
85 "frame-gradient-color",
86 "Frame Gradient Color",
87 "The top color of the chrome frame gradient. (If unspecified,"
88 " chrome will create a lighter tint of frame-color",
89 GDK_TYPE_COLOR,
90 G_PARAM_READABLE));
91 gtk_widget_class_install_style_property(
92 widget_class,
93 g_param_spec_boxed(
94 "inactive-frame-gradient-color",
95 "Inactive Frame Gradient Color",
96 "The top color of the inactive chrome frame gradient. (If"
97 " unspecified, chrome will create a lighter tint of frame-color",
98 GDK_TYPE_COLOR,
99 G_PARAM_READABLE));
100 gtk_widget_class_install_style_property(
101 widget_class,
102 g_param_spec_boxed(
103 "incognito-frame-gradient-color",
104 "Incognito Frame Gradient Color",
105 "The top color of the incognito chrome frame gradient. (If"
106 " unspecified, chrome will create a lighter tint of frame-color",
107 GDK_TYPE_COLOR,
108 G_PARAM_READABLE));
109 gtk_widget_class_install_style_property(
110 widget_class,
111 g_param_spec_boxed(
112 "incognito-inactive-frame-gradient-color",
113 "Incognito Inactive Frame Gradient Color",
114 "The top color of the incognito inactive chrome frame gradient. (If"
115 " unspecified, chrome will create a lighter tint of frame-color",
116 GDK_TYPE_COLOR,
117 G_PARAM_READABLE));
118
119 // Scrollbar color properties:
120 gtk_widget_class_install_style_property(
121 widget_class,
122 g_param_spec_boxed(
123 "scrollbar-slider-prelight-color",
124 "Scrollbar Slider Prelight Color",
125 "The color applied to the mouse is above the tab",
126 GDK_TYPE_COLOR,
127 G_PARAM_READABLE));
128 gtk_widget_class_install_style_property(
129 widget_class,
130 g_param_spec_boxed(
131 "scrollbar-slider-normal-color",
132 "Scrollbar Slider Normal Color",
133 "The color applied to the slider normally",
134 GDK_TYPE_COLOR,
135 G_PARAM_READABLE));
136 gtk_widget_class_install_style_property(
137 widget_class,
138 g_param_spec_boxed(
139 "scrollbar-trough-color",
140 "Scrollbar Trough Color",
141 "The background color of the slider track",
142 GDK_TYPE_COLOR,
143 G_PARAM_READABLE));
144 }
145
146 static void chrome_gtk_frame_init(ChromeGtkFrame* frame) {
147 }
148
149 GtkWidget* chrome_gtk_frame_new(void) {
150 return GTK_WIDGET(g_object_new(chrome_gtk_frame_get_type(),
151 "type", GTK_WINDOW_TOPLEVEL,
152 NULL));
153 }
154
155 G_END_DECLS
OLDNEW
« no previous file with comments | « chrome/browser/ui/libgtk2ui/chrome_gtk_frame.h ('k') | chrome/browser/ui/libgtk2ui/chrome_gtk_menu_subclasses.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698