Beispiel #1
0
        public void SetTheme(Color windowFG, Color windowBG, Color controlFG, Color controlBG, Color accent1, Color accent2, Color highLight)
        {
            // control BG, FG
            // button FG, BG
            // windowFG, gray1, gray2, pale1, pale2
            // windowBG, gray1, gray2, pale1, pale2
            // accent1, gray1, gray2, pale1, pale2
            // accent2, gray1, gray2, pale1, pale2

            // make sure base colors dont exceed 80% lum and 80%
            //windowFG = LimitColor(windowFG);
            //controlFG = LimitColor(controlFG);
            accent1 = LimitColor(accent1);
            accent2 = LimitColor(accent2);

            Window         = new ColorWay(windowFG, windowBG);
            Control        = new ColorWay(controlFG, controlBG);
            AccentWindow1  = new ColorWay(accent1, windowBG);
            AccentWindow2  = new ColorWay(accent2, windowBG);
            AccentControl1 = new ColorWay(accent1, controlBG);
            AccentControl2 = new ColorWay(accent2, controlBG);
            Highlight      = new ColorWay(highLight, windowBG);

            _slightPen = null;
            _transPen  = null;
            _vtransPen = null;
        }
Beispiel #2
0
        private void DrawSwatch(Graphics g, int x, int y, int wIDTH, ColorWay cw, string txt)
        {
            Brush br   = Brushes.LightBlue;
            var   font = new Font(FontFamily.GenericSansSerif, 10f);

            g.DrawString(txt, font, br, x, y - 20);
            g.FillRectangle(cw.Foreground.Brush, x, y, wIDTH, HEIGHT); g.DrawString("FG", font, br, x, y); y += HEIGHTSPACE;
            g.FillRectangle(cw.Background.Brush, x, y, wIDTH, HEIGHT); g.DrawString("BG", font, br, x, y); y += HEIGHTSPACE;
            y += 10;
            g.FillRectangle(cw.Bright.Brush, x, y, wIDTH, HEIGHT); g.DrawString("Bright", font, br, x, y); y += HEIGHTSPACE;
            g.FillRectangle(cw.High.Brush, x, y, wIDTH, HEIGHT); g.DrawString("Hi", font, br, x, y); y       += HEIGHTSPACE;
            g.FillRectangle(cw.Medium.Brush, x, y, wIDTH, HEIGHT); g.DrawString("Med", font, br, x, y); y    += HEIGHTSPACE;
            g.FillRectangle(cw.Low.Brush, x, y, wIDTH, HEIGHT); g.DrawString("Low", font, br, x, y); y       += HEIGHTSPACE;
            g.FillRectangle(cw.VLow.Brush, x, y, wIDTH, HEIGHT); g.DrawString("VLow", font, br, x, y); y     += HEIGHTSPACE;
        }