5
// Lluis Sanchez <lluis@xamarin.com>
7
// Copyright (c) 2012 Xamarin Inc
9
// Permission is hereby granted, free of charge, to any person obtaining a copy
10
// of this software and associated documentation files (the "Software"), to deal
11
// in the Software without restriction, including without limitation the rights
12
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
// copies of the Software, and to permit persons to whom the Software is
14
// furnished to do so, subject to the following conditions:
16
// The above copyright notice and this permission notice shall be included in
17
// all copies or substantial portions of the Software.
19
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
27
using MonoDevelop.Components;
29
namespace MonoDevelop.Ide.Gui
33
public static readonly Cairo.Color BaseBackgroundColor = new Cairo.Color (1, 1, 1);
34
public static readonly Cairo.Color BaseForegroundColor = new Cairo.Color (0, 0, 0);
38
public static readonly Gdk.Color ThinSplitterColor = new Gdk.Color (166, 166, 166);
43
public static readonly Cairo.Color TabBarBackgroundColor = CairoExtensions.ParseColor ("c2c2c2");
44
public static readonly Cairo.Color TabBarActiveTextColor = new Cairo.Color (0, 0, 0);
46
public static readonly Cairo.Color TabBarGradientStartColor = Shift (TabBarBackgroundColor, 0.92);
47
public static readonly Cairo.Color TabBarGradientMidColor = TabBarBackgroundColor;
48
public static readonly Cairo.Color TabBarGradientEndColor = Shift (TabBarBackgroundColor, 0.9);
49
public static readonly Cairo.Color TabBarGradientShadowColor = Shift (TabBarBackgroundColor, 0.8);
50
public static readonly Cairo.Color TabBarHoverActiveTextColor = TabBarActiveTextColor;
51
public static readonly Cairo.Color TabBarInactiveTextColor = Blend (new Cairo.Color (0, 0, 0), TabBarGradientStartColor, 0.4);
52
public static readonly Cairo.Color TabBarHoverInactiveTextColor = new Cairo.Color (0, 0, 0);
54
public static readonly Cairo.Color BreadcrumbGradientStartColor = CairoExtensions.ParseColor ("FFFFFF");
55
public static readonly Cairo.Color BreadcrumbBackgroundColor = Shift (BreadcrumbGradientStartColor, .95);
56
public static readonly Cairo.Color BreadcrumbGradientEndColor = Shift (BreadcrumbGradientStartColor, 0.9);
57
public static readonly Cairo.Color BreadcrumbBorderColor = Shift (BreadcrumbBackgroundColor, 0.6);
58
public static readonly Cairo.Color BreadcrumbInnerBorderColor = WithAlpha (BaseBackgroundColor, 0.1d);
59
public static readonly Gdk.Color BreadcrumbTextColor = Shift (BaseForegroundColor, 0.8).ToGdkColor ();
60
public static readonly Cairo.Color BreadcrumbButtonBorderColor = Shift (BaseBackgroundColor, 0.8);
61
public static readonly Cairo.Color BreadcrumbButtonFillColor = WithAlpha (BaseBackgroundColor, 0.1d);
62
public static readonly Cairo.Color BreadcrumbBottomBorderColor = Shift (BreadcrumbBackgroundColor, 0.7d);
63
public static readonly bool BreadcrumbInvertedIcons = false;
64
public static readonly bool BreadcrumbGreyscaleIcons = false;
68
public static readonly Cairo.Color DockTabBarGradientTop = new Cairo.Color (248d / 255d, 248d / 255d, 248d / 255d);
69
public static readonly Cairo.Color DockTabBarGradientStart = new Cairo.Color (242d / 255d, 242d / 255d, 242d / 255d);
70
public static readonly Cairo.Color DockTabBarGradientEnd = new Cairo.Color (230d / 255d, 230d / 255d, 230d / 255d);
71
public static readonly Cairo.Color DockTabBarShadowGradientStart = new Cairo.Color (154d / 255d, 154d / 255d, 154d / 255d, 1);
72
public static readonly Cairo.Color DockTabBarShadowGradientEnd = new Cairo.Color (154d / 255d, 154d / 255d, 154d / 255d, 0);
74
public static readonly Gdk.Color PadBackground = new Gdk.Color (240, 240, 240);
75
public static readonly Gdk.Color InactivePadBackground = ReduceLight (PadBackground, 0.9);
76
public static readonly Gdk.Color PadLabelColor = new Gdk.Color (92, 99, 102);
77
public static readonly Gdk.Color DockFrameBackground = new Gdk.Color (157, 162, 166);
78
public static readonly Gdk.Color DockSeparatorColor = ThinSplitterColor;
80
public static readonly Gdk.Color BrowserPadBackground = new Gdk.Color (0xE5, 0xEC, 0xEE);
81
public static readonly Gdk.Color InactiveBrowserPadBackground = ReduceLight (BrowserPadBackground, 0.92);
83
public static readonly Cairo.Color DockBarBackground1 = PadBackground.ToCairoColor ();
84
public static readonly Cairo.Color DockBarBackground2 = Shift (PadBackground.ToCairoColor (), 0.95);
85
public static readonly Cairo.Color DockBarSeparatorColorDark = new Cairo.Color (0, 0, 0, 0.2);
86
public static readonly Cairo.Color DockBarSeparatorColorLight = new Cairo.Color (1, 1, 1, 0.3);
88
public static readonly Cairo.Color DockBarPrelightColor = CairoExtensions.ParseColor ("ffffff");
92
public static readonly Cairo.Color WidgetBorderColor = CairoExtensions.ParseColor ("8c8c8c");
94
public static readonly Cairo.Color StatusBarBorderColor = CairoExtensions.ParseColor ("919191");
96
public static readonly Cairo.Color StatusBarFill1Color = CairoExtensions.ParseColor ("f5fafc");
97
public static readonly Cairo.Color StatusBarFill2Color = CairoExtensions.ParseColor ("e9f1f3");
98
public static readonly Cairo.Color StatusBarFill3Color = CairoExtensions.ParseColor ("d8e7ea");
99
public static readonly Cairo.Color StatusBarFill4Color = CairoExtensions.ParseColor ("d1e3e7");
101
public static readonly Cairo.Color StatusBarErrorColor = CairoExtensions.ParseColor ("FF6363");
103
public static readonly Cairo.Color StatusBarInnerColor = new Cairo.Color (0,0,0, 0.08);
104
public static readonly Cairo.Color StatusBarShadowColor1 = new Cairo.Color (0,0,0, 0.06);
105
public static readonly Cairo.Color StatusBarShadowColor2 = new Cairo.Color (0,0,0, 0.03);
106
public static readonly Cairo.Color StatusBarTextColor = CairoExtensions.ParseColor ("555555");
107
public static readonly Cairo.Color StatusBarProgressBackgroundColor = new Cairo.Color (0, 0, 0, 0.1);
108
public static readonly Cairo.Color StatusBarProgressOutlineColor = new Cairo.Color (0, 0, 0, 0.2);
110
public static readonly Pango.FontDescription StatusFont = Pango.FontDescription.FromString ("Normal");
112
public static readonly int StatusFontPixelHeight = 12;
113
public static readonly int ProgressBarHeight = 16;
114
public static readonly int ProgressBarInnerPadding = 3;
115
public static readonly int ProgressBarOuterPadding = 3;
119
public static readonly Cairo.Color ToolbarBottomBorderColor = new Cairo.Color (0.5, 0.5, 0.5);
120
public static readonly Cairo.Color ToolbarBottomGlowColor = new Cairo.Color (1, 1, 1, 0.2);
124
public static readonly int TooltipInfoSpacing = 1;
128
public static class PopoverWindow
130
public static readonly int PagerTriangleSize = 6;
131
public static readonly int PagerHeight = 16;
133
public static class ParamaterWindows
135
public static readonly Cairo.Color GradientStartColor = CairoExtensions.ParseColor ("fffee6");
136
public static readonly Cairo.Color GradientEndColor = CairoExtensions.ParseColor ("fffcd1");
142
internal static Cairo.Color Shift (Cairo.Color color, double factor)
144
return new Cairo.Color (color.R * factor, color.G * factor, color.B * factor, color.A);
147
internal static Cairo.Color WithAlpha (Cairo.Color c, double alpha)
149
return new Cairo.Color (c.R, c.G, c.B, alpha);
152
internal static Cairo.Color Blend (Cairo.Color color, Cairo.Color targetColor, double factor)
154
return new Cairo.Color (color.R + ((targetColor.R - color.R) * factor),
155
color.G + ((targetColor.G - color.G) * factor),
156
color.B + ((targetColor.B - color.B) * factor),
161
internal static Cairo.Color MidColor (double factor)
163
return Blend (BaseBackgroundColor, BaseForegroundColor, factor);
166
internal static Cairo.Color ReduceLight (Cairo.Color color, double factor)
168
var c = new HslColor (color);
173
internal static Cairo.Color IncreaseLight (Cairo.Color color, double factor)
175
var c = new HslColor (color);
176
c.L += (1 - c.L) * factor;
180
internal static Gdk.Color ReduceLight (Gdk.Color color, double factor)
182
return ReduceLight (color.ToCairoColor (), factor).ToGdkColor ();
185
internal static Gdk.Color IncreaseLight (Gdk.Color color, double factor)
187
return IncreaseLight (color.ToCairoColor (), factor).ToGdkColor ();