コード例 #1
0
            private string GetCustomStyle()
            {
                var color = AppAppearanceManager.Instance.AccentColor;

                return(BinaryResources.SrsStyle
                       .Replace(@"#E20035", color.ToHexString())
                       .Replace(@"#CA0030", ColorExtension.FromHsb(color.GetHue(), color.GetSaturation(), color.GetBrightness() * 0.92).ToHexString()));
            }
コード例 #2
0
        private void OnHsbChanged()
        {
            if (_skip)
            {
                return;
            }
            _skip = true;
            var color = ColorExtension.FromHsb(Hue, 0.01 * Saturation, 0.01 * Brightness);

            Color = color;
            UpdateRgb(color);
            _skip = false;
        }
コード例 #3
0
ファイル: Srs2.xaml.cs プロジェクト: sphayte/actools
            private static string PrepareStyle(string style, bool transparentBackgroundSupported)
            {
                var color = AppAppearanceManager.Instance.AccentColor;

                style = style
                        .Replace(@"#E20035", color.ToHexString())
                        .Replace(@"#CA0030", ColorExtension.FromHsb(color.GetHue(), color.GetSaturation(), color.GetBrightness() * 0.92).ToHexString());
                style = Regex.Replace(style, @"(?<=^|@media).+", m => ("" + m)
                                      .Replace(@"no-ads", SettingsHolder.Plugins.CefFilterAds ? @"all" : @"print")
                                      .Replace(@"transparent-bg", transparentBackgroundSupported ? @"all" : @"print"));

                return(style);
            }