Exemplo n.º 1
0
        public static void SetDialogColor(this IHTMLDiv toolbar, Color toolbar_color, bool up)
        {
            if (up)
            {
                toolbar.style.backgroundColor = toolbar_color;

                var toolbar_color_light  = toolbar_color.AddLum(+20);
                var toolbar_color_shadow = toolbar_color.AddLum(-20);

                toolbar.style.borderLeft         = "1px solid " + toolbar_color_light;
                toolbar.style.borderTop          = "1px solid " + toolbar_color_light;
                toolbar.style.borderRight        = "1px solid " + toolbar_color_shadow;
                toolbar.style.borderBottom       = "1px solid " + toolbar_color_shadow;
                toolbar.style.backgroundPosition = "0px 0px";
            }
            else
            {
                toolbar.style.backgroundColor = toolbar_color.AddLum(+15);

                var toolbar_color_light  = toolbar_color.AddLum(+20 + 15);
                var toolbar_color_shadow = toolbar_color.AddLum(-20 + 15);

                toolbar.style.borderLeft         = "1px solid " + toolbar_color_shadow;
                toolbar.style.borderTop          = "1px solid " + toolbar_color_shadow;
                toolbar.style.borderRight        = "1px solid " + toolbar_color_light;
                toolbar.style.borderBottom       = "1px solid " + toolbar_color_light;
                toolbar.style.backgroundPosition = "1px 1px";
            }
        }