diff options
author | Lluis Sanchez Gual <lluis@xamarin.com> | 2015-04-20 19:07:51 +0300 |
---|---|---|
committer | Lluis Sanchez Gual <lluis@xamarin.com> | 2015-04-20 19:07:51 +0300 |
commit | 95408b1a41b31b645f3a8c3323ab7d3ca4bff26b (patch) | |
tree | f8f137cddcb9a40499d303be95722fd2c6081bce /main/src/core/MonoDevelop.Ide/MonoDevelop.Components/GtkUtil.cs | |
parent | b70e4e04b4e41b8ec28d7e4b220b401ecf467e7a (diff) | |
parent | de043d330a8bf5855d4d983c804cd36727cb2406 (diff) |
Merge remote-tracking branch 'origin/roslyn' into new-project-model
Diffstat (limited to 'main/src/core/MonoDevelop.Ide/MonoDevelop.Components/GtkUtil.cs')
-rw-r--r-- | main/src/core/MonoDevelop.Ide/MonoDevelop.Components/GtkUtil.cs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/GtkUtil.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/GtkUtil.cs index 5818c33e5b..a083d352f2 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/GtkUtil.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/GtkUtil.cs @@ -88,6 +88,19 @@ namespace MonoDevelop.Components return c.ToGdkColor (); } + /// <summary> + /// Makes a color lighter or darker + /// </summary> + /// <param name='lightAmount'> + /// Amount of lightness to add. If the value is positive, the color will be lighter, + /// if negative it will be darker. Value must be between 0 and 1. + /// </param> + public static HslColor AddLight (this HslColor color, double lightAmount) + { + color.L += lightAmount; + return color; + } + public static Cairo.Color AddLight (this Cairo.Color color, double lightAmount) { var c = color.ToXwtColor (); |