From 735da28f52d139770f5b793a488ea195f9c8180a Mon Sep 17 00:00:00 2001 From: gamosoft_cp Date: Thu, 12 Sep 2013 11:02:13 +0000 Subject: [PATCH] Added rounded categories (up to 3 circles) --- Outlook2013TodoAddIn/AppointmentsControl.cs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Outlook2013TodoAddIn/AppointmentsControl.cs b/Outlook2013TodoAddIn/AppointmentsControl.cs index 42fc60b..e873920 100644 --- a/Outlook2013TodoAddIn/AppointmentsControl.cs +++ b/Outlook2013TodoAddIn/AppointmentsControl.cs @@ -555,12 +555,15 @@ namespace Outlook2013TodoAddIn if (catColors.Count != 0) { - int catWidth = categoriesRectangle.Width / catColors.Count; - Rectangle catRect = categoriesRectangle; - catColors.ForEach(cc => + // int catWidth = categoriesRectangle.Width / catColors.Count; + int catWidth = categoriesRectangle.Width / 3; // TODO: This looks nicer, but more than 3 won't fit + Rectangle catRect = categoriesRectangle; catRect.Width = catWidth; + // catColors.ForEach(cc => + catColors.Take(3).ToList().ForEach(cc => { - e.Graphics.FillRectangle(new SolidBrush(cc), catRect); - catRect.Width = catWidth; catRect.Offset(catWidth, 0); + e.Graphics.FillEllipse(new SolidBrush(cc), catRect); + //e.Graphics.FillRectangle(new SolidBrush(cc), catRect); + catRect.Offset(catWidth, 0); }); }