From 5b6b908f2b2f1c0a15f1508296751e276e39dbe9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Minisini?= Date: Sat, 11 Apr 2009 07:12:16 +0000 Subject: [PATCH] [DEVELOPMENT ENVIRONMENT] * NEW: New way of making source file icons. [GB.DB.*] * BUG: Forgot to add *.component files. git-svn-id: svn://localhost/gambas/trunk@1927 867c0c6c-44f3-4631-809d-bfa615b0a4ec --- app/src/gambas3/Project.module | 43 ++++++++++++------ app/src/gambas3/img/module/class-16.png | Bin 0 -> 252 bytes app/src/gambas3/img/module/class.png | Bin 271 -> 385 bytes app/src/gambas3/img/module/form-16.png | Bin 0 -> 295 bytes app/src/gambas3/img/module/form.png | Bin 436 -> 605 bytes app/src/gambas3/img/module/module-16.png | Bin 0 -> 230 bytes app/src/gambas3/img/module/module.png | Bin 285 -> 315 bytes app/src/gambas3/img/module/webpage-16.png | Bin 0 -> 648 bytes app/src/gambas3/img/module/webpage.png | Bin 103 -> 1347 bytes gb.db.firebird/src/gb.db.firebird.component | 6 +++ gb.db.odbc/src/gb.db.odbc.component | 6 +++ .../src/gb.db.postgresql.component | 6 +++ gb.db.sqlite2/src/gb.db.sqlite2.component | 6 +++ gb.db.sqlite3/src/gb.db.sqlite3.component | 6 +++ 14 files changed, 59 insertions(+), 14 deletions(-) create mode 100644 app/src/gambas3/img/module/class-16.png create mode 100644 app/src/gambas3/img/module/form-16.png create mode 100644 app/src/gambas3/img/module/module-16.png create mode 100644 app/src/gambas3/img/module/webpage-16.png create mode 100644 gb.db.firebird/src/gb.db.firebird.component create mode 100644 gb.db.odbc/src/gb.db.odbc.component create mode 100644 gb.db.postgresql/src/gb.db.postgresql.component create mode 100644 gb.db.sqlite2/src/gb.db.sqlite2.component create mode 100644 gb.db.sqlite3/src/gb.db.sqlite3.component diff --git a/app/src/gambas3/Project.module b/app/src/gambas3/Project.module index 01980b8fd..dbe6426cc 100644 --- a/app/src/gambas3/Project.module +++ b/app/src/gambas3/Project.module @@ -539,23 +539,36 @@ Private Sub AddLinkEmblem(hPict As Picture) As Picture End -Private Sub MakeModuleIcon(sModule As String, Optional iSize As Integer = 16) As Picture +Private Sub MakeModuleIcon(sModule As String, Optional iSize As Integer) As Picture + Dim hPict As Picture Dim hImage As Image Dim hImageModule As Image + Dim sKey As String - If Not $hFileImage Then $hFileImage = Image.Load("icon:/" & iSize & "/file") + If Not $hFileImage Then $hFileImage = Picture["icon:/32/file"].Image - hImage = $hFileImage.Copy() - hImageModule = Image.Load("module" &/ sModule & ".png").Stretch(iSize, iSize) - hImage.Draw(hImageModule, 0, 0) - Return hImage.Picture + If iSize = 0 Then iSize = 16 + + sKey = "img/" & sModule & "-" & iSize & ".png" + hPict = Picture[sKey] + If Not hPict Then + hImage = $hFileImage.Stretch(iSize, iSize) + If iSize = 16 Then + hImageModule = Image.Load("img/module" &/ sModule & "-16.png") + Else + hImageModule = Image.Load("img/module" &/ sModule & ".png").Stretch(iSize, iSize) + Endif + hImage.Draw(hImageModule, 0, 0) + hPict = hImage.Picture + Picture[sKey] = hPict + Endif + + Return hPict End - - Public Sub GetFileIcon(sPath As String, Optional iSize As Integer) As Picture Dim hImage As Image @@ -573,6 +586,7 @@ Public Sub GetFileIcon(sPath As String, Optional iSize As Integer) As Picture Dim iDim As Integer Dim bConflict As Boolean Dim hConflict As Image + Dim sModule As String If iSize Then sPrefix = "icon:/" & iSize @@ -600,11 +614,8 @@ Public Sub GetFileIcon(sPath As String, Optional iSize As Integer) As Picture Case "form", "class", "module", "webpage" If File.Dir(sPath) = Project.Dir Then - If iSize > 16 Then - sIcon = "img/32" &/ sExt & ".png" - Else - sIcon = "img/16" &/ sExt & ".png" - Endif + sModule = sExt + sIcon = sExt & "-" & iSize bStartup = File.BaseName(sPath) = Startup And Not bNoStartup Endif @@ -684,7 +695,11 @@ Public Sub GetFileIcon(sPath As String, Optional iSize As Integer) As Picture Try hPict = Picture[sKey] If Not hPict Then - hPict = Picture[sIcon] + If sModule Then + hPict = MakeModuleIcon(sModule, iSize) + Else + hPict = Picture[sIcon] + Endif If Not hPict Then hPict = Picture[sPrefix &/ "file"] If Not hPict Then hPict = Picture["img/16/unknown.png"] hPict = hPict.Copy() diff --git a/app/src/gambas3/img/module/class-16.png b/app/src/gambas3/img/module/class-16.png new file mode 100644 index 0000000000000000000000000000000000000000..719467e91524f4c58356b2b13e02888538c41626 GIT binary patch literal 252 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|*pj^6T^Rm@ z;DWu&Cj&(|3p^r=85p>QL70(Y)*K0-AbW|YuPgga7A|o)mX&kgUjPc#c)B=-Se$-) zX(R8U03MbL?2a8CR{}OVd8w#12yS9yPUVP_iaNrU8I;!4;NmJZ{m&!ii%(}w_WyQs z)7h5&k2=_^Vm6%Cy!WV;O*AT|m?x{IprfMqQ}iRH#0^|^?EEYJKDX5MbNXo%aO-lX p+a!z2e%l|D)XAH6Ie3{N(++8Y@9XR~&jh-I!PC{xWt~$(698yuRJ#BG literal 0 HcmV?d00001 diff --git a/app/src/gambas3/img/module/class.png b/app/src/gambas3/img/module/class.png index dc1b155d779ea00d05cf1ce8d853c5f6badf3815..30420d182434aeaace764c2edcd8d9438351dd85 100644 GIT binary patch delta 297 zcmV+^0oMMH0)YdNVSg7L3H$-Tt^fc50ZBwbR9M69)iFu~K@`UEpCTekO0kGls+=K( zmEsk|TKgb&f*0@xHe&AyY^+rfOT}h;K~kteqQ+*0VMyTwClQ%HEWDk!yYJ)8xAQ0z z3R7lg%=ebCgH1Hi#|@5gn_F}n6^0|OckJaXK99Sg;0e~Ti+^6d_KCGz0=9$V*U=Vs zgWOpz0jEKc!x6q{V-<~`esC^PKr4u=DECrtPZG0<&o2b=$8WSWRls8qFHb|jRS!g($ewlJtoIKW1|-oQm*(1V<3!G3i3RCo^VFC(vHVGH+>kRFb(IEh*CO%p44 v#ltv%Mv8#pgdzsr-yO%L1OKxFg+k#AzA8VWLTy*G00000NkvXXu0mjfz6^wr delta 182 zcmV;n07?IW1CIibVSf!O2JHx2tpET3k4Z#9R9M69)G-P|F${p=?|B$OP;l{ny@wa@ z1iE+#opsmcIf;vcE)_Z|LZy%VTS7?!{S$(qVWwE&ga>-8Yc*fsh9~aWh($ diff --git a/app/src/gambas3/img/module/form-16.png b/app/src/gambas3/img/module/form-16.png new file mode 100644 index 0000000000000000000000000000000000000000..f4c0290f234014ca3f1ad398ddc68dc24df335d0 GIT binary patch literal 295 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|*pj^6T^Rm@ z;DWu&Cj&(|3p^r=85p>QL70(Y)*K0-AbW|YuPgga7A|pBrW&86cY#97JzX3_EKa|@ zWXQ$j$isSJeTBjL#Qc|v+r*^xpK!9=JeHQYTbG5~@Nmkcvj$?D6%MT^Zut9Qwurta z)0s$-wAU-|U;5)L&G6FQev=NTrYei+9XYgTe~DWM4fH^F7W literal 0 HcmV?d00001 diff --git a/app/src/gambas3/img/module/form.png b/app/src/gambas3/img/module/form.png index 316f84a030b915f6fd17e491c7d86ed8940df23a..dd1ec2a12406e5f034f15f77d683c974dd25f1f9 100644 GIT binary patch delta 518 zcmV+h0{Q*41Kk9WVSg7S9&uL4(*OVg-AP12R9M69S37PSF%+CN>^1yR5x5itSb&iW z1ToaPaF@a6r0@yi(uHePx`u^7{&3%Km4c6wY%JnML`6kJU;%<$V1_fpN3xjD z=h$Z3!i)rCjekH8m&!WHk;w*=6ibrRaN2O;26O3!n!r^i?Tey;o(vH zT@XUR%gb{%|4&al2qCm5(Cc+E7+hu}Fc@5-*Xy>opx-}7zkiO0hx^9uL!ziyL1L&x z!J?={QHg;>!G9dbzkU4-0Jy%sYF`IFYNQ4d1FL~l!5WE>7{tkt&;3;)`cq3_5k$da zV5z~H2pL#wkSIhgZz&e7!BRuSfw+zfF-*E zF1>#&>e4$Ab34R9QiF5@3ZxZN@?8wXDU`nYg)*5#xPMH)u7oc3$;<<(Aa+Z%&aHqg zGa%-BesxQ_1(s~uNCu+h>~@G4Xa$foDbPLxd+jao@R=@EP>scBC7`LFJp*4Zy8q@% z1^|=E1kC*ANL>eHJRYMg%jUDX>0z>|dtoEi?q#$i@ZS^o4UFC1uD@XMEdT%j07*qo IM6N<$f@03`;s5{u delta 348 zcmV-i0i*ui1hfN?VSf!SAuMhy!TR zCosGQzMc;vZ{eXmc=KRF;6Pn%aZ6J>Tnr(lx=k$h;LhpK?w`z;%+AgbGo#KpLd{_S zY6ocM4~VD%;JoPWmyrTkFmv`J0D!aQGI$Qd54+0jj?-Qb27mo)01F*JGYF)erk@bv z0-pB-Dc`gShQq6^zt=n6(@L#v01a&k06-~)>GT2f`3$4c4Z7XF7Qpi!xBe)4-_w)H zUAZ>^0C60n)jEM?wUK3jl&@NVU4N0b?c?$QN-3;X5jq_QQp(bG-u36TQmQR2dh%TA=QL70(Y)*K0-AbW|YuPgga7A|oGK8{}5%|M|vPZ!4!i_>o} zZRBhT5OBTt_`J>mwKs=cQf_Z-$US@}Y>lJA7Or6X>?D=d8ft9!QXYKVVQ~0E(d-oU z|4PoCV)B0i6y^z3 literal 0 HcmV?d00001 diff --git a/app/src/gambas3/img/module/module.png b/app/src/gambas3/img/module/module.png index aae94e2eb50410f1984b27136b822f0cbb002773..7dad5a62693d4ca6fe4fcdf74e9cdc189f4602d0 100644 GIT binary patch delta 226 zcmV<803H9G0=oi`VSg7LJ2cjjE&u=kyGcYrR9M69mN5zfF%U&xwy?DK0%B|92`u#< zHiC!n4qL8RS$hb*ZnIS{+nPec~I8KKc0vn(L`if7$ zTI)05Ae-k9Fae@$YvKqjfS1Yd5}A~-Ip7S8fUEK+umYB*W?TBpro|ruqKS7v4IGsR zpak}&W{_HdrIv5xFS>%8sp;hu(0p~}A^$ctA*XR}aa&$bJ20j(1DplRnAOHXW07*qoM6N<$g4qjV?f?J) delta 196 zcmV;#06YJ?0-XYoVSf!KD+FRl)Bpegok>JNR9M69(m@JAQ5c5d=URb@9k2&Xtw=U- z)*!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