leocb / MaterialSkin

Theming .NET WinForms, C# or VB.Net, to Google's Material Design Principles.
MIT License
446 stars 132 forks source link

DrawerTabControl binds image list, but these images are jagged. One of these image is copied from this project's Resource folder. #204

Closed hwenjun closed 3 years ago

hwenjun commented 3 years ago

image

I add these codes in the MaterialTabSelector class:

protected override void OnPaint(PaintEventArgs e)
 {
            var g = e.Graphics;
            g.TextRenderingHint = TextRenderingHint.ClearTypeGridFit;
            g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality;//add
            g.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.HighQualityBicubic;//add
            g.CompositingQuality = System.Drawing.Drawing2D.CompositingQuality.HighQuality;//add

            g.Clear(SkinManager.ColorScheme.PrimaryColor);
            //more ...
}

but it doesn't work, and I don't know why. My .net framework is 4.8.

orapps44 commented 3 years ago

Hi,

Are you using last release (2.2.1) or actual master code ? If you are using last release then try to compile from master.

Dolefly commented 3 years ago

Any solution for this problem?

Dolefly commented 3 years ago

Solve, go to ImageList Properties, change color depth to 32bit(Depth32Bit)