From cf52e226d7a1e8ca58d0c15315f37dbd73283307 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Thu, 11 Oct 2007 00:45:48 +0200 Subject: [PATCH] - draw status icons from code (currently no gradients) --- Block.cs | 32 +++++++++++++++----------------- data/state-bad.png | Bin 313 -> 0 bytes data/state-good.png | Bin 314 -> 0 bytes data/state-not-ready.png | Bin 276 -> 0 bytes data/state-ready.png | Bin 293 -> 0 bytes 5 files changed, 15 insertions(+), 17 deletions(-) delete mode 100644 data/state-bad.png delete mode 100644 data/state-good.png delete mode 100644 data/state-not-ready.png delete mode 100644 data/state-ready.png diff --git a/Block.cs b/Block.cs index a5d255c..5de4748 100644 --- a/Block.cs +++ b/Block.cs @@ -148,10 +148,6 @@ namespace Eithne private bool showerror = false; private float progressTimer = 0; - private static ImageSurface StateBad = new ImageSurface(System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "data/state-bad.png")); - private static ImageSurface StateGood = new ImageSurface(System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "data/state-good.png")); - private static ImageSurface StateNotReady = new ImageSurface(System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "data/state-not-ready.png")); - private static ImageSurface StateReady = new ImageSurface(System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "data/state-ready.png")); private static ImageSurface Clock = new ImageSurface(System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "data/clock.png")); private static bool ConfigGradient = Config.Get("block/gradient", true); @@ -337,9 +333,9 @@ namespace Eithne // status location if(plugin is ConnectorPlugin) - sy = h/2 - 4; + sy = h/2; else - sy = h - 11; + sy = h - 7; // clock location cy = h/2 - 16; @@ -360,9 +356,9 @@ namespace Eithne // status location if(plugin is ConnectorPlugin) - sx = w/2 - 4; + sx = w/2; else - sx = w/2 - 3; + sx = w/2 + 1; // clock location cx = w/2 - 16; @@ -469,21 +465,23 @@ namespace Eithne { State s = CheckState(); - c.Color = new Color(1, 1, 1); - c.Save(); - c.Translate(x + sx, y + sy); - if(s == State.NotReady) - StateNotReady.Show(c, 0, 0); + c.Color = new Color(0.06, 0.06, 0.06); else if(s == State.Bad) - StateBad.Show(c, 0, 0); + c.Color = new Color(0.627, 0.03, 0.03); else if(s == State.Good) - StateGood.Show(c, 0, 0); + c.Color = new Color(0.25, 0.75, 0.25); else - StateReady.Show(c, 0, 0); + c.Color = new Color(1, 0.5, 0); + + c.Arc(x+sx, y+sy, 4, 0, 2 * Math.PI); + c.FillPreserve(); + c.Color = new Color(0.06, 0.06, 0.627); + c.Stroke(); + c.Arc(x+sx, y+sy, 3, 0, 2 * Math.PI); + c.Color = new Color(1, 1, 1, 0.25); c.Stroke(); - c.Restore(); } private void DrawBlockGradient(Context c) diff --git a/data/state-bad.png b/data/state-bad.png deleted file mode 100644 index b51f2ab46203286a7cfe06d8abb5fd4dd8a294cc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcwPel00001 literal 313 zcwPZH0mlA`P)%>H(piLUB>sR{ zSqpX++F0y>)quyD#o~j@{Z4TX0YDhL7xVsI#=W6-xZC}lE99&{%u{t?z77*OQgv#$ zf15LQEr?5}>fHSH`}k?M@vRg-dp%q&4ovKwWn{*?(eHal_>dBB)hb@gWlZaJOuAbL z*|8=OyVTRoUA)w4c;+1AQVEZ7jFD_1p!=H4u_QZL*fvkiCLW@wVBBaRsjM1KH!@pt zAVPMKCzXyF$rV_vR3>C=wq#5E&)gB5u4e)5=zuP3PNki>RLuMX_MLRtnoVu000000 LNkvXXu0mjf*)EF` diff --git a/data/state-good.png b/data/state-good.png deleted file mode 100644 index 93c81b03e049bedc376b3c8c1002610cea0501c8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcwPel00001 literal 314 zcwPZI0mc4_P)>xxJtxIPPw^j{qQw@@TN#l-C-mC{_A0E4!-HcGBEV?qs}qK)kt!o!m&R zag{5|r9sN|Ai0&x-zB1-2s1ImV!J>uo=dG6a#E|u;^OlflkW+JUqd(_4&1ei@yisH zjRc|fNKD_);jKON-}>mTy0D%tcv%3I*@9@zF>lXDGI$NpdFoX1S3b{i<7=V znUl9dN4nW5-0TFc@K{oISe)E9{xN$7)sMK!4us0~1l7#~)2uN60Km9{MI*M3r~m)} M07*qoM6N<$g4*Sdf&c&j diff --git a/data/state-not-ready.png b/data/state-not-ready.png deleted file mode 100644 index f5a83fb876f06d35c4a81874542044376e82db9f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcwPel00001 literal 276 zcwPY%0qg#WP)%c;a#3%4c zw!Ce(7{3iEe(*6fe9SNajPsRN?GG!(!bjpAwdn25Oe`8xmBH->aJw^@>MmrWZaA+s zi)r(6AMn=!emSsd0o!Akr(sa?*)n-F^UfB)nv8D-d=aY_+%ktur=9|pcRx9a9C#