Ejemplo n.º 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()));
            }
Ejemplo n.º 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;
        }
Ejemplo n.º 3
0
            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);
            }