From 6fdf5747089fce487773b8fee1e2f2be52c4777a Mon Sep 17 00:00:00 2001 From: Mark van Renswoude Date: Wed, 19 Dec 2007 14:11:31 +0000 Subject: [PATCH] Fixed: determine transparent color before resizing the component icon --- Lib/D7/UnitSwitcherD7.bpl | Bin 148992 -> 148992 bytes Source/CmpSwDialog.pas | 6 ++++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Lib/D7/UnitSwitcherD7.bpl b/Lib/D7/UnitSwitcherD7.bpl index ec36897166da8967d5a30113d1212919fb4dd70a..44766d7236169e360aa679e63024912c69467d57 100644 GIT binary patch delta 3745 zcmZuz4^&iD8ov)vVV#0iNEBDd%*?QcW~3QlhKDxb8h?gxPy)#|JyPP@%CP-2XHKIl zc$vcUSZOyp>RK*amIk=MC^GO2w9ryFoy@a&&f1;Y=}8HPY^WH{ld#awe*fqF2qYh#J56q`*#u3-c1|o6-mV-B3Yd! z5<42{Lpv@K4O*8hl6=TkK)-5GB&}%i?Z)>rgb67aPHirJT$p-qEV=9zNp$Xpjq6LQ zHatIt#KUxQ$%c(~%L{9suC=e3NiH9kcC1ZoKmNhN2;sldiyzKSj1>scov~HDcNDIb zhga9nc3W6C>6JP^%viXK5Yi^>*)l1IFr`dU>MbK2>keb-S!x+!V^Hyag!evaW?M$V zZdg*w7!_yIPpEB#X;ka$I`0!@WvlDss+vIIhRLQCiX!_Td|Xk6N5jfCD5+)C$}W_0 zZJhL8Tk-?GRf-ZuTv5##n+ikO|9LStrCu=e1QGL26ek z+STP{fpViU0Mo(qXPxELvyv9rPLVV+CSSv5SnPEN)Cd;tPJ<6xIJ#WV3D&}^?%*^&6z z)f%3LKseryp#pdU$FlXvFQ0JdY*lEYa+ZW9d;u&M6WJe-`a064{~mmm<+2+rb%{_S z;yIo0Hbt6zXx_Am{o|QN6R zpg)@6+X1pS3;7b`-2g8ExN5GGAjv+}I(wX^GDLHyO7k`n8D8Wa2!k761CQ)Kgx}%O zCo6e%^hXiuEh$}Yqdwgg>I&x1r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berF`|AX0D>2XC`0YV#h%?Xcd)wI!UIgl?dj1XtIvr(IJe zEnDM?ud$ShhP=_JJB{z5J^kV`ELaU?o-In%B-+Qd;QQ{Jak;w7h^~)M6e5?S8hdzR zpQ6mpU+)e^8x9B1plFOG7{*%&Kr{oYzP;Rzx9skmjj+C0@hltOoh(tN?H)I0r{DQr zbO&_xSaD`D#F@D>OFc95#12HD*UNnNkS#9XuG+*G1XSXijWu*9y>?ysRSP@RG;$^H_KKl?y#Cm8F;v^V3$!{Jl=ZZW%$qZQPa1i0*OWHX_#P+tE+-@b<9aV4J24KN zBIJZj@a;~>m>%G}fptM1qrVG2?64+EkDCY15I6@>j4PiKQjS3|F2K}Yj9QH3vk(Jc z^B1T%N5~)s#|X~bx)Y`QFH76nI;pfys@a&mEBjLR=$r{Tf6lp(<6#&G?k`ec2&K1;t`U#2hDzoM_ySLrwCtMxYhW_`2%gx*!8_voVy ziH1prR70M@Vkk9K8zM8~Gm|p2GvCN;%XDRalNpy~$XcECPS(Y&t65WwxyEJ2jm8g+ z$Bq5QFOB~+erNozF)TYaJ0)A2ZOERPJwLmsO>syIB#m49t@eLfB(LbV(t*&m1r0lf z)k~@Im^_6T@ksa)GJxhQRsyiFUMf|QAJ$7TKSFw>2gs{G1PB%5MVG)MR7ExXK!aeI zh5&MY3b1krpyHL!00e+?gK!Z(jd(kv!i^URI)?2PfBZ(_esX4 F{{vJB#0LNX diff --git a/Source/CmpSwDialog.pas b/Source/CmpSwDialog.pas index 8491ec7..aa7efe2 100644 --- a/Source/CmpSwDialog.pas +++ b/Source/CmpSwDialog.pas @@ -17,7 +17,7 @@ uses BaseSwDialog, BaseSwObjects, - CmpSwFilters, UnSwDialog; + CmpSwFilters; type @@ -180,6 +180,7 @@ var packageHandle: THandle; bitmapHandle: THandle; bitmap: Graphics.TBitmap; + transpColor: TColor; begin Result := -1; @@ -197,6 +198,7 @@ begin bitmap := Graphics.TBitmap.Create(); try bitmap.Handle := bitmapHandle; + transpColor := bitmap.TransparentColor; if (bitmap.Width <> FImageList.Width) or (bitmap.Height <> FImageList.Height) then @@ -204,7 +206,7 @@ begin ResizeBitmap(bitmap, FImageList.Width, FImageList.Height); end; - Result := FImageList.AddMasked(bitmap, bitmap.TransparentColor); + Result := FImageList.AddMasked(bitmap, transpColor); finally FreeAndNil(bitmap); end;