From 886418413f5f48a887d6725700a55ae0ccbf8652 Mon Sep 17 00:00:00 2001 From: Basile Burg Date: Thu, 18 Jan 2018 21:53:41 +0100 Subject: [PATCH] allow toolbar to autoselect the 24 or 32 px version of the icon --- icons/arrow/arrow_update24.png | Bin 0 -> 1745 bytes icons/arrow/arrow_update32.png | Bin 0 -> 2096 bytes lazproj/coedit.lpi | 8 +- src/ce_dsgncontrols.pas | 132 ++++++++++++++++++------ src/ce_main.lfm | 180 --------------------------------- src/ce_main.pas | 9 +- src/ce_symlist.lfm | 20 ++-- src/ce_symlist.pas | 1 + src/ce_widget.lfm | 6 +- 9 files changed, 129 insertions(+), 227 deletions(-) create mode 100644 icons/arrow/arrow_update24.png create mode 100644 icons/arrow/arrow_update32.png diff --git a/icons/arrow/arrow_update24.png b/icons/arrow/arrow_update24.png new file mode 100644 index 0000000000000000000000000000000000000000..e5def0aeec164493c08ff81cc62810567a438b8e GIT binary patch literal 1745 zcmV;?1}^!DP)ob&s= z*IsN(DW#Nh373sw9Z(R6n^?p+gNCgSLi$eqyW7q!9_TiC3tI+U`%)}{ zOR*#_#gb^bkwC}bDCU>vqv=e?iQePy)K6c&{z)qoW+p-^?Q=(eire~9rm~_?PbZvg;!!TK%Ef8X5p+_h5;&zp1_u3>mSJ|7v+V8rpj1Q!4?i&z00 zmR1M_6mmlr(!QZRr>~o6eh!v>d&;ijbvvp6V9Az)%*S5a>;gc=oT{bE=S+ZS3<8#d zr3JQDu#`d~?Ll$&%KVJudm}?oBG8rvC5(uz5wSJZo$tf6N#n5iu9?pRz>!VMeF1aH~I+s~xCMFIs@FjB08K@bs? zFkIhY#3f807cPqxEgF1e_1vQj0F%e%ttiNips{_>ge?tXhA0JXX(%OdJOhHy0FX(> zPoDedj_n_8TetGY*%Ny+BMFGsJ~1O?Y4j&uLv{!=%LOCZkxOlt3$s+{8$#>sbBkPJb-s7=|$O7~vIwj4=Rkqw~a}9jU>-lqdxe zfe1s}R>s)DVAPU{Y#~ia*8nVJ>Ffexf-^kS@yYH@k6k@h_iS%Z3?jxE1N?%>5Rn0Z zjt_U&C*tu|G6WHU7J&z*WX8ZU4ylmE7;!uV!vsqUKm=PDy`CQj5Nm$xnVrr+PhTqD zb8-xD@0NWliDhH`lRMS`2S);mlhJ@6nem{BVE{O;fh7dCm?&ciL<}tgVMaKhF?oD` zQMhV-34qwey1)GO>e2U3j{$~;6D#MEvFOfe_pW*Pp~kX_#U&}9!6IN$ zAQ1Vk3*&n(Uq9E-HX850On~T{N-zWy%+166xwD={)f3Zi2iQWUD?W-|KWHAfZ+?hE zQSEsKni<+sfNvx*7;EcoX=vl#(}&Iv^>n@OX424>Hd+M6fNqSkf9E%*XW>h zm+pa7+hYJ@423jf$nmJT&qLR+2d%QrW@&}dR1$ripVjrAK75`5;QE=5-|g?}$|$8t zi6EdAMjV$1Ou&3+(d_U~?qB-B_qYG%aP`)@%{Kuqv%uB@V*n-Dju)jsEQnpbn(S`= zXb%AJ#>Nwy}PDnc6IH~Csa%=%_%G@u!CW=o;`=X8}1$lzyUB5K;Rbt zzAbnp6b`l1SNtI&03zW@l?%!iu2~^EP#lUxhFafy;a3Bl?E?T9z*ps)FNbHPh-I7p np#j(c!T@q_o>+gKpU(dP9M+_DUQlCY00000NkvXXu0mjf7O+2; literal 0 HcmV?d00001 diff --git a/icons/arrow/arrow_update32.png b/icons/arrow/arrow_update32.png new file mode 100644 index 0000000000000000000000000000000000000000..c1ab75d3bfabcb68c0ee0ca63ed27e12ee32783d GIT binary patch literal 2096 zcmV-02+#M4P)9aiWq^euq+Tl5+Edw?bwceeeHYgyK_F@Yi#30thIFFT>JaZ`F+3hJLi1n;Oo82 z>wEg+YBB{W4M0mJ{|!my?U--uujdcF9KIh1+}8x)e5$)I@T;BQ00JQ=k}y6!3&VFp zaAnkcSqV>fo_*~{Be+hR4}fWXPu~olz@EfEY^64LL>_nWkm^0Te{&~3y4JngH|43V zfFuGawV9yaWrLQgVu&M{PY3V7m66HAXI|ON8bIw=6FEm`GNp6{7Au5zOsF>4ic;x3I%~7F|em_@%ix}T)Y{AXO=C1 zuJ%O>w4T1v{yiHT^FdIwDB7*lJv*P{d?P39=&Q(LDqtem&;*gcM?bv41J4T}Ab0`) zH;DpRL=iZAes5qBrejI?-nzxrPaNnSC%pLp2$2tMTuXu1Q*2@z$&r|20y7`d&E-j# z*772UAnuwVa3CUBi;0K6K_B>}By3#K=vlMp$Q!gJ8vwo3C0+Z(R`}h86Afa1a(ZR)W*%+`aVs-OUDr1_06V(27HC z4=;cjS-}(V_nJUX1(=N|vjHe5t`&nv|MXJu#^5J0uNPEF!ZeAvUdZef5di7q_<#J+ zzN8k)8kZh1Qo#V!w>{&wS&LRLZK{OcE7OeXLLi9hC<4erK>8US{p9^)pT4&H7pHo5 zbx1z%bQ~EGn2)rdGE#DuxH2zZmFm16U(8KJ)vhZIxJglypnkVF8JUz|F8_Kz>V8lAj3 zGCmc$rwj{#nDGx^cu$T>Ot|@4l2keZYg??VFn<$R-&D6bxkpow`k{aPrH`mR)xGn( zQSX$b%Cn!(KQTZa>OFK$k>hDUS!GH715#!zaH3wyjDA|2eYj$)34G}=lwUs$loR_l zufg{?1<7vdYrBvAo#XgbAMM>#L45@+X1567vYWskNoD-fds4ewNWAf3Oa+F}Kuc7W zSVgFD6~nS0^gNu^F^8#Z(v~a$HsFMfo7)zZefvP~DAoA#pZsoRrK@V~EcfLSrEXRzKPVEl>aQQvM{% zz1e7B#`RxL#i6X+4Qs#I0;4mDwD647>H{qj3;ijM3=K?_!(1dgDzdjkxj7D*8q}XTK6A~LK%wnsim=v2dkOoJdDZF@OZb7)=3#9h(<;~!7medZIpN&+n-1fefkbZyWx6hr=E=Q_) z5U~4cTEWX7eea+0f;<}-pqLb!*Y9f4tHOa{LxtKk@cHTppp=#yFO4U+DibG%<2?21lxB z7Sn@7(8n+~C>4)D`5g-?2&4)+o_rKY`E;i=sz#U(0NVJ~>kzs<{O;|49luO5v+n~` zT7k2FcwzsoYr}p;PT;jlWP&j|m`O-mFs@;a6&RS1(-%cUm>T4Cy?i4OtqpGAEOwjT z*wkzQnvQ7lRCnjrp^KM%34QS7h*D39(Ndwn)od=Ka;&VWh7B9qw?DDx$XiBiK5IW| zVFqpNxA%EQwwG>F^G$X-Vi8(7T18QLO;z*epKU9tZC-D(mOQ{(ES}__2X}aq3E8jz zQnKFX?@djgs1kP{KVD5b5TdLUtxONb>zcWtzkj9I|MTlu(3_4`r - + @@ -119,6 +119,8 @@ + + @@ -165,6 +167,10 @@ + + + + diff --git a/src/ce_dsgncontrols.pas b/src/ce_dsgncontrols.pas index 62287161..54c42e6a 100644 --- a/src/ce_dsgncontrols.pas +++ b/src/ce_dsgncontrols.pas @@ -18,10 +18,12 @@ type fScaledSeparator: boolean; fPng: TPortableNetworkGraphic; fDPng: TPortableNetworkGraphic; + function findResourceWithSize(value: integer): boolean; procedure setResourceName(const value: string); procedure setScaledSeparator(value: boolean); procedure setToolBar(value: TToolbar); protected + procedure reloadPng; procedure Paint; override; procedure SetEnabled(Value: Boolean); override; published @@ -33,22 +35,31 @@ type procedure toBitmap(value: TBitmap); end; + TToolBarScaling = (auto, force16, force24, force32); + (** * Toolbar with design-time support for TCEToolbutton *) TCEToolBar = class(TToolBar) protected fDesignMenu: TPopupMenu; + fToolBarScaling: TToolBarScaling; procedure dsgnAdd(style: TToolButtonStyle); procedure dsgnAddButton(sender: TObject); procedure dsgnAddDivider(sender: TObject); procedure dsgnAddSeparator(sender: TObject); procedure dsgnAddDropdown(sender: TObject); procedure dsgnAddCheckbutton(sender: TObject); + procedure setScaling(value: TToolBarScaling); + procedure Loaded; override; public constructor Create(TheOwner: TComponent); override; destructor Destroy; override; procedure CMDesignHitTest(var Message: TCMDesignHitTest); message CM_DESIGNHITTEST; + published + property ButtonHeight stored false; + property ButtonWidth stored false; + property Scaling: TToolBarScaling read fToolBarScaling write setScaling stored false; end; procedure register; @@ -82,38 +93,66 @@ begin FToolBar := value; end; -procedure TCEToolButton.setResourceName(const value: string); +function TCEToolButton.findResourceWithSize(value: integer): boolean; var - i,j:integer; - px: PRGBAQuad; - gr: byte; + n: string; +begin + n := resourceName + IntToStr(value); + result := FindResource(HINSTANCE, PChar(n), PChar(RT_RCDATA)) <> 0; +end; + +procedure TCEToolButton.reloadPng; +var + i: integer; + j: integer; + p: PRGBAQuad; + g: byte; + n: string; + h: integer; +begin + fPng.FreeImage; + fDPng.FreeImage; + + n := resourceName; + h := FToolBar.ButtonHeight; + + if n.IsEmpty then + exit; + + if (h > 50) and findResourceWithSize(32) then + n += '32' + else if (h > 30) and findResourceWithSize(24) then + n += '24'; + + fPng.LoadFromResourceName(HINSTANCE, n); + fDPng.LoadFromResourceName(HINSTANCE, n); + + if fDpng.PixelFormat = pf32bit then + for i:= 0 to fDPng.Height-1 do + begin + {$PUSH}{$HINTS OFF}{$WARNINGS OFF}{$R-} + p := PRGBAQuad(fDPng.ScanLine[i]); + {$POP} + for j:= 0 to fDPng.Width-1 do + begin + g := (p^.Red div 5) + (p^.Green div 100) * 70 + (p^.Blue div 11); + p^.Green:=g; + p^.Blue:=g; + p^.Red:=g; + p += 1; + end; + end; +end; + +procedure TCEToolButton.setResourceName(const value: string); begin if fResourceName = value then exit; - fResourceName:=value; + fResourceName := value; if csDesigning in ComponentState then exit; if Style in [tbsButton, tbsDropDown] then - begin - fPng.FreeImage; - fPng.LoadFromResourceName(HINSTANCE, fResourceName); - fDPng.FreeImage; - fDPng.LoadFromResourceName(HINSTANCE, fResourceName); - if fDpng.PixelFormat = pf32bit then for i:= 0 to fDPng.Height-1 do - begin - {$PUSH}{$HINTS OFF}{$WARNINGS OFF}{$R-} - px := PRGBAQuad(fDPng.ScanLine[i]); - {$POP} - for j:= 0 to fDPng.Width-1 do - begin - gr := (px^.Red div 5) + (px^.Green div 100) * 70 + (px^.Blue div 11); - px^.Green:=gr; - px^.Blue:=gr; - px^.Red:=gr; - px += 1; - end; - end; - end; + reloadPng; if assigned(fToolBar) then FToolBar.Repaint; end; @@ -195,14 +234,10 @@ begin borderSpacing.Top := 2; borderSpacing.Right := 2; borderSpacing.Bottom := 0; - height := 30; - ButtonHeight := 28; - ButtonWidth := 28; EdgeInner:= esNone; EdgeOuter:= esNone; Flat := false; Transparent := true; - AutoSize := true; end; destructor TCEToolBar.Destroy; @@ -212,6 +247,45 @@ begin inherited; end; +procedure TCEToolBar.Loaded; +begin + inherited; + setScaling(auto); +end; + +procedure TCEToolBar.setScaling(value: TToolBarScaling); +var + i: integer; +begin + fToolBarScaling := value; + if ((fToolBarScaling = TToolBarScaling.auto) and (ScaleY(16, 96) >= 32)) or + (fToolBarScaling = TToolBarScaling.force32) then + begin + height := 60; + ButtonHeight := 56; + ButtonWidth := 56; + end else + if ((fToolBarScaling = TToolBarScaling.auto) and (ScaleY(16, 96) >= 24)) or + (fToolBarScaling = TToolBarScaling.force24) then + begin + height := 44; + ButtonHeight := 42; + ButtonWidth := 42; + end + else + begin + height := 30; + ButtonHeight := 28; + ButtonWidth := 28; + end; + + for i := 0 to ControlCount-1 do + if Controls[i] is TCEToolButton then + TCEToolButton(Controls[i]).reloadPng; + + Repaint; +end; + procedure TCEToolBar.CMDesignHitTest(var Message: TCMDesignHitTest); begin inherited; diff --git a/src/ce_main.lfm b/src/ce_main.lfm index b466ace8..003d56bc 100644 --- a/src/ce_main.lfm +++ b/src/ce_main.lfm @@ -1491,42 +1491,6 @@ object CEMainForm: TCEMainForm end object mnuItemMruFile: TMenuItem Caption = 'Open recent file' - Bitmap.Data = { - 36040000424D3604000000000000360000002800000010000000100000000100 - 2000000000000004000064000000640000000000000000000000FFFFFF000000 - 00000000000000000000000000000000001200000025000000330000002E0000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF000000 - 0000000000120000002500000033326E987A3E8BC1C84195D1FF3892D1ED0000 - 00330000003300000033000000330000003300000023FFFFFF00FFFFFF000000 - 002F326F997C3D8AC1C74092CEFF54ADDEFF66C4EDFF78E0FEFF3591D1FFBBB2 - AAFFB0AEABFFADADABFFAEAEABFFAFAFADFFA4A4A2C0FFFFFF00FFFFFF004295 - CEEF58B0DFFF6DC9EFFF7FE2FDFF7EE3FEFF7ADEFCFF7EE1FFFF308CCDFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFB0B0ADFFFFFFFF00FFFFFF004094 - CFFF92F1FFFF85E7FFFF80E1FDFF7ADEFBFF77DBFBFF83E1FFFF308ACBFFFFFF - FBFFFFFFFDFFFCFCFCFFFCFCFCFFFFFFFFFFAEAEABFFFFFFFF00FFFFFF003E92 - CEFF9AF0FFFF83E4FDFF7EDFFCFF7ADDFBFF76DAFAFF89E2FEFF48A8DDFF70AE - D9FFFFFCF8FFF9F6F6FFF7F6F6FFFFFFFFFFADADABFFFFFFFF00FFFFFF003E92 - CEFFA3F1FFFF82E3FCFF7EDFFCFF7ADDFBFF76DAFAFF71D9FBFF9DE8FFFF2A89 - CBFFFFFBF6FFF6F4F3FFF4F3F3FFFFFFFFFFADADABFFFFFFFF00FFFFFF003D92 - CEFFADF3FFFF81E3FCFF7EDFFCFF7ADDFBFF76DAFAFF6FD8FAFFABEBFFFF2B89 - CCFFFFF8F1FFF2F1EFFFEFF0EEFFFFFFFFFFADADABFFFFFFFF00FFFFFF003C92 - CEFFB6F6FFFF80E3FCFF7DDFFCFF7ADDFBFF76DAFAFF6ED7FAFFB9EFFFFF2A89 - CCFFFCF2EDFFEEECEBFFEBEAEAFFFFFFFFFFADADABFFFFFFFF00FFFFFF003C91 - CEFFC0F8FFFF7FE2FCFF7DDFFCFF7ADDFBFF75DAFAFF6DD7FAFFC6F3FFFF2989 - CBFFFFF9F4FFFFFFFFFFFFFFFFFFFFFFFFFFAEAEABFFFFFFFF00FFFFFF003B91 - CEFFC9F9FFFF7EE2FCFF7CDEFCFF78DCFBFF72D9FAFF6AD6FAFFD2F6FFFF2888 - CBFFFFFFFFFFCDCBC9FFA4A4A2FFFFFFFFFFAFAFADFFFFFFFF00FFFFFF003A91 - CEFFD2FCFFFF7AE2FCFF77DDFCFF7FDFFBFF9BE6FDFFB3EDFFFFD4F9FFFF2688 - CBFFFFFFFFFFA7A5A2FFFFFFFFFFE9E9E9FFB0B0AEACFFFFFF00FFFFFF003991 - CFFFE9FFFFFFAFF0FFFFCEF7FFFFDAFAFFFFC4ECFCFF8CCAECFF5FAEE0FF82BD - E6FFFFFFFFFFFFFFFFFFE9E9E9FFAFAFADA700000000FFFFFF00FFFFFF003C93 - D0FFE9FFFFFFA8DAF3FF7BBDE4FF4398D2FF408EC7FF6E9CBCFF90A5B2FFBAAF - A6FFB5ADA6FFB5AFA9FFB5B1ADA40000000000000000FFFFFF00FFFFFF004297 - D2FF3B93D0FF62ADDCFF93CDEDFFBBE7FAFFD8FCFFFFD6FCFFFFD3FBFFFFD1FB - FFFFD3FCFFFF2E91D5FF000000000000000000000000FFFFFF00FFFFFF00459A - D3EF4498D2FF4197D1FF3F95D1FF3D94D0FF3B93D0FF3A92D0FF3A92D0FF3A93 - D0FF3C94D1FF3E97D3EE000000000000000000000000FFFFFF00 - } ImageIndex = 9 end object MenuItem43: TMenuItem @@ -1663,42 +1627,6 @@ object CEMainForm: TCEMainForm Caption = 'Project' object MenuItem31: TMenuItem Caption = 'New project' - Bitmap.Data = { - 36040000424D3604000000000000360000002800000010000000100000000100 - 2000000000000004000064000000640000000000000000000000FFFFFF000000 - 0000000000330000000000000033000000000000003300000000000000330000 - 000000000033000000000000003300000000FFFFFF00FFFFFF00FFFFFF000000 - 003389898AFF0000003389898AFF0000003389898AFF0000003389898AFF0000 - 003389898AFF0000003389898AFF00000033FFFFFF00FFFFFF00FFFFFF008989 - 8AFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFF89898AFFFFFFFF00FFFFFF00FFFFFF000000 - 0033FFFFFFFFFDFDFDFFFCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFFFCFCFCFFFCFC - FCFFFCFCFCFFFDFDFDFFFFFFFFFF00000033FFFFFF00FFFFFF00FFFFFF008989 - 8AFFFFFFFFFFFAF9F9FFF9F8F8FFF9F8F8FFF9F8F8FFF9F8F8FFF9F8F8FFF9F8 - F8FFF9F8F8FFFAF9F9FFFFFFFFFF89898AFFFFFFFF00FFFFFF00FFFFFF000000 - 0033FFFFFFFFF6F6F6FFF6F6F6FFF6F6F6FFF6F6F6FFF6F6F6FFF6F6F6FFF6F6 - F6FFF6F6F6FFF6F6F6FFFFFFFFFF00000033FFFFFF00FFFFFF00FFFFFF008989 - 8AFFFFFFFFFFF4F4F3FFF4F4F3FFF4F4F3FFF4F4F3FFF4F4F3FFF4F4F3FFF4F4 - F3FFF4F4F3FFF4F4F3FFFFFFFFFF89898AFFFFFFFF00FFFFFF00FFFFFF000000 - 0033FFFFFFFFF2F1F0FFF2F1F0FFF2F1F0FFF2F1F0FFF2F1F0FFF2F1F0FFF2F1 - F0FFF2F1F0FFF2F1F0FFFFFFFFFF00000033FFFFFF00FFFFFF00FFFFFF008989 - 8AFFFFFFFFFFEFEFEEFFEFEFEEFFEFEFEEFFEFEFEEFFEFEFEEFFEFEFEEFFEFEF - EEFFEEEEEDFFEEEFEEFFFFFFFFFF89898AFFFFFFFF00FFFFFF00FFFFFF000000 - 0033FFFFFFFFEDEBEAFFEDECEBFFEDECEBFFEDECEBFFEDECEBFFECEBEAFFECEB - E9FFEBEAE9FFECEAE9FFFFFFFFFF00000033FFFFFF00FFFFFF00FFFFFF008989 - 8AFFFFFFFFFFE9E9E8FFEAEAE9FFEAEAE9FFEAEAE9FFE9E9E8FFF4F4F2FFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFF89898AFFFFFFFF00FFFFFF00FFFFFF000000 - 0033FFFFFFFFE7E6E5FFE8E7E6FFE8E7E6FFE8E7E6FFE6E5E4FFFFFFFFFF9191 - 91FFFFFFFFFF929292FFFFFFFFFF00000033FFFFFF00FFFFFF00FFFFFF008989 - 8AFFFFFFFFFFE3E3E2FFE4E4E3FFE4E5E4FFE4E4E3FFE3E3E2FFFFFFFFFFFFFF - FFFFE6E6E4FFFFFFFFFFE0E0E0AB89898AFFFFFFFF00FFFFFF00FFFFFF000000 - 0033FFFFFFFFE0DFDDFFE0DFDEFFE0DFDEFFE0DFDEFFDFDEDCFFFFFFFFFF9191 - 91FFFFFFFFFFDDDDDDA789898AFF00000000FFFFFF00FFFFFF00FFFFFF008989 - 8AFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFE0E0E0AB89898AFF0000000000000000FFFFFF00FFFFFF00FFFFFF00A5A5 - A53889898AFF0000000089898AFF0000000089898AFF0000000089898AFF0000 - 000089898AFF000000000000000000000000FFFFFF00FFFFFF00 - } ImageIndex = 8 object MenuItem69: TMenuItem Action = actProjNewDubJson @@ -1712,42 +1640,6 @@ object CEMainForm: TCEMainForm end object mnuItemMruProj: TMenuItem Caption = 'Open recent project' - Bitmap.Data = { - 36040000424D3604000000000000360000002800000010000000100000000100 - 2000000000000004000064000000640000000000000000000000FFFFFF000000 - 00000000000000000000000000000000001200000025000000330000002E0000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF000000 - 0000000000120000002500000033326E987A3E8BC1C84195D1FF3892D1ED0000 - 00330000003300000033000000330000003300000023FFFFFF00FFFFFF000000 - 002F326F997C3D8AC1C74092CEFF54ADDEFF66C4EDFF78E0FEFF3591D1FFBBB2 - AAFFB0AEABFFADADABFFAEAEABFFAFAFADFFA4A4A2C0FFFFFF00FFFFFF004295 - CEEF58B0DFFF6DC9EFFF7FE2FDFF7EE3FEFF7ADEFCFF7EE1FFFF308CCDFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFB0B0ADFFFFFFFF00FFFFFF004094 - CFFF92F1FFFF85E7FFFF80E1FDFF7ADEFBFF77DBFBFF83E1FFFF308ACBFFFFFF - FBFFFFFFFDFFFCFCFCFFFCFCFCFFFFFFFFFFAEAEABFFFFFFFF00FFFFFF003E92 - CEFF9AF0FFFF83E4FDFF7EDFFCFF7ADDFBFF76DAFAFF89E2FEFF48A8DDFF70AE - D9FFFFFCF8FFF9F6F6FFF7F6F6FFFFFFFFFFADADABFFFFFFFF00FFFFFF003E92 - CEFFA3F1FFFF82E3FCFF7EDFFCFF7ADDFBFF76DAFAFF71D9FBFF9DE8FFFF2A89 - CBFFFFFBF6FFF6F4F3FFF4F3F3FFFFFFFFFFADADABFFFFFFFF00FFFFFF003D92 - CEFFADF3FFFF81E3FCFF7EDFFCFF7ADDFBFF76DAFAFF6FD8FAFFABEBFFFF2B89 - CCFFFFF8F1FFF2F1EFFFEFF0EEFFFFFFFFFFADADABFFFFFFFF00FFFFFF003C92 - CEFFB6F6FFFF80E3FCFF7DDFFCFF7ADDFBFF76DAFAFF6ED7FAFFB9EFFFFF2A89 - CCFFFCF2EDFFEEECEBFFEBEAEAFFFFFFFFFFADADABFFFFFFFF00FFFFFF003C91 - CEFFC0F8FFFF7FE2FCFF7DDFFCFF7ADDFBFF75DAFAFF6DD7FAFFC6F3FFFF2989 - CBFFFFF9F4FFFFFFFFFFFFFFFFFFFFFFFFFFAEAEABFFFFFFFF00FFFFFF003B91 - CEFFC9F9FFFF7EE2FCFF7CDEFCFF78DCFBFF72D9FAFF6AD6FAFFD2F6FFFF2888 - CBFFFFFFFFFFCDCBC9FFA4A4A2FFFFFFFFFFAFAFADFFFFFFFF00FFFFFF003A91 - CEFFD2FCFFFF7AE2FCFF77DDFCFF7FDFFBFF9BE6FDFFB3EDFFFFD4F9FFFF2688 - CBFFFFFFFFFFA7A5A2FFFFFFFFFFE9E9E9FFB0B0AEACFFFFFF00FFFFFF003991 - CFFFE9FFFFFFAFF0FFFFCEF7FFFFDAFAFFFFC4ECFCFF8CCAECFF5FAEE0FF82BD - E6FFFFFFFFFFFFFFFFFFE9E9E9FFAFAFADA700000000FFFFFF00FFFFFF003C93 - D0FFE9FFFFFFA8DAF3FF7BBDE4FF4398D2FF408EC7FF6E9CBCFF90A5B2FFBAAF - A6FFB5ADA6FFB5AFA9FFB5B1ADA40000000000000000FFFFFF00FFFFFF004297 - D2FF3B93D0FF62ADDCFF93CDEDFFBBE7FAFFD8FCFFFFD6FCFFFFD3FBFFFFD1FB - FFFFD3FCFFFF2E91D5FF000000000000000000000000FFFFFF00FFFFFF00459A - D3EF4498D2FF4197D1FF3F95D1FF3D94D0FF3B93D0FF3A92D0FF3A92D0FF3A93 - D0FF3C94D1FF3E97D3EE000000000000000000000000FFFFFF00 - } ImageIndex = 9 end object MenuItem42: TMenuItem @@ -1821,42 +1713,6 @@ object CEMainForm: TCEMainForm end object mnuItemMruGroup: TMenuItem Caption = 'Open recent projects group' - Bitmap.Data = { - 36040000424D3604000000000000360000002800000010000000100000000100 - 2000000000000004000064000000640000000000000000000000FFFFFF000000 - 00000000000000000000000000000000001200000025000000330000002E0000 - 00000000000000000000000000000000000000000000FFFFFF00FFFFFF000000 - 0000000000120000002500000033326E987A3E8BC1C84195D1FF3892D1ED0000 - 00330000003300000033000000330000003300000023FFFFFF00FFFFFF000000 - 002F326F997C3D8AC1C74092CEFF54ADDEFF66C4EDFF78E0FEFF3591D1FFBBB2 - AAFFB0AEABFFADADABFFAEAEABFFAFAFADFFA4A4A2C0FFFFFF00FFFFFF004295 - CEEF58B0DFFF6DC9EFFF7FE2FDFF7EE3FEFF7ADEFCFF7EE1FFFF308CCDFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFB0B0ADFFFFFFFF00FFFFFF004094 - CFFF92F1FFFF85E7FFFF80E1FDFF7ADEFBFF77DBFBFF83E1FFFF308ACBFFFFFF - FBFFFFFFFDFFFCFCFCFFFCFCFCFFFFFFFFFFAEAEABFFFFFFFF00FFFFFF003E92 - CEFF9AF0FFFF83E4FDFF7EDFFCFF7ADDFBFF76DAFAFF89E2FEFF48A8DDFF70AE - D9FFFFFCF8FFF9F6F6FFF7F6F6FFFFFFFFFFADADABFFFFFFFF00FFFFFF003E92 - CEFFA3F1FFFF82E3FCFF7EDFFCFF7ADDFBFF76DAFAFF71D9FBFF9DE8FFFF2A89 - CBFFFFFBF6FFF6F4F3FFF4F3F3FFFFFFFFFFADADABFFFFFFFF00FFFFFF003D92 - CEFFADF3FFFF81E3FCFF7EDFFCFF7ADDFBFF76DAFAFF6FD8FAFFABEBFFFF2B89 - CCFFFFF8F1FFF2F1EFFFEFF0EEFFFFFFFFFFADADABFFFFFFFF00FFFFFF003C92 - CEFFB6F6FFFF80E3FCFF7DDFFCFF7ADDFBFF76DAFAFF6ED7FAFFB9EFFFFF2A89 - CCFFFCF2EDFFEEECEBFFEBEAEAFFFFFFFFFFADADABFFFFFFFF00FFFFFF003C91 - CEFFC0F8FFFF7FE2FCFF7DDFFCFF7ADDFBFF75DAFAFF6DD7FAFFC6F3FFFF2989 - CBFFFFF9F4FFFFFFFFFFFFFFFFFFFFFFFFFFAEAEABFFFFFFFF00FFFFFF003B91 - CEFFC9F9FFFF7EE2FCFF7CDEFCFF78DCFBFF72D9FAFF6AD6FAFFD2F6FFFF2888 - CBFFFFFFFFFFCDCBC9FFA4A4A2FFFFFFFFFFAFAFADFFFFFFFF00FFFFFF003A91 - CEFFD2FCFFFF7AE2FCFF77DDFCFF7FDFFBFF9BE6FDFFB3EDFFFFD4F9FFFF2688 - CBFFFFFFFFFFA7A5A2FFFFFFFFFFE9E9E9FFB0B0AEACFFFFFF00FFFFFF003991 - CFFFE9FFFFFFAFF0FFFFCEF7FFFFDAFAFFFFC4ECFCFF8CCAECFF5FAEE0FF82BD - E6FFFFFFFFFFFFFFFFFFE9E9E9FFAFAFADA700000000FFFFFF00FFFFFF003C93 - D0FFE9FFFFFFA8DAF3FF7BBDE4FF4398D2FF408EC7FF6E9CBCFF90A5B2FFBAAF - A6FFB5ADA6FFB5AFA9FFB5B1ADA40000000000000000FFFFFF00FFFFFF004297 - D2FF3B93D0FF62ADDCFF93CDEDFFBBE7FAFFD8FCFFFFD6FCFFFFD3FBFFFFD1FB - FFFFD3FCFFFF2E91D5FF000000000000000000000000FFFFFF00FFFFFF00459A - D3EF4498D2FF4197D1FF3F95D1FF3D94D0FF3B93D0FF3A92D0FF3A92D0FF3A93 - D0FF3C94D1FF3E97D3EE000000000000000000000000FFFFFF00 - } ImageIndex = 9 end object MenuItem103: TMenuItem @@ -1960,42 +1816,6 @@ object CEMainForm: TCEMainForm Caption = 'Windows' object mnuLayout: TMenuItem Caption = 'Layout' - Bitmap.Data = { - 36040000424D3604000000000000360000002800000010000000100000000100 - 2000000000000004000064000000640000000000000000000000FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00BE7D - 558FBD7C54B5BC7B53EEBA7953FFB67751FFB47651FFB17450FFAD724FFFAA71 - 4FFFA86F4EFFA76E4DFFA66E4DFEA46E4DF1A66E4DC4FFFFFF00FFFFFF00C080 - 55DEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA66E4DEDFFFFFF00FFFFFF00C282 - 58FEFFFFFFFFAF672CFFAD642BFFAD642BFFFFFFFFFF56AB5DFF51A657FF4CA1 - 52FF479C4CFF449849FF409445FFFFFFFFFFA76F4EFEFFFFFF00FFFFFF00C486 - 5AFFFFFFFFFFAF672CFFCD9F74FFAD642BFFFFFFFFFF4B9F50FF70C97BFF70C9 - 7BFF6FC87AFF6EC778FF3E9343FFFFFFFFFFA8714FFFFFFFFF00FFFFFF00C586 - 5BFFFFFFFFFFAF672CFFCDA075FFAD642BFFFFFFFFFF4EA354FF73CA7DFF72CA - 7DFF71C97CFF6FC87AFF419546FFFFFFFFFFAC7250FFFFFFFF00FFFFFF00C788 - 5AFFFFFFFFFFB46E33FFD0A57EFFB26C2EFFFFFFFFFF50A556FF74CB7EFF73CB - 7DFF72CA7CFF70C97BFF449949FFFFFFFFFFB27651FFFFFFFF00FFFFFF00C88A - 5BFFFFFFFFFFB77640FFD1A683FFB67338FFFFFFFFFF52A859FF73CB7DFF73CB - 7DFF72CA7CFF70C97BFF479C4DFFFFFFFFFFB67853FFFFFFFF00FFFFFF00CA8C - 5CFFFFFFFFFFBC7F54FFBA7D4CFFBA7C4AFFFFFFFFFF469B4CFF53A859FF51A6 - 57FF4FA455FF4DA253FF4A9F50FFFFFFFFFFB97C54FFFFFFFF00FFFFFF00CB8E - 5DFEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFBC7E55FFFFFFFF00FFFFFF00CC90 - 5EFAFFFFFFFFEDC49BFFEDC49BFFEDC49BFFEDC49BFFEDC49BFFEDC49BFFEDC4 - 9BFFEDC49BFFEDC49BFFEDC49BFFFFFFFFFFBE8157FFFFFFFF00FFFFFF00CD91 - 5FF0FFFFFFFFEDC49CFFF4DAC1FFF4DAC1FFF4DBC2FFF4DBC2FFF4DBC2FFF4DB - C2FFF4DBC2FFF4DBC2FFEDC49BFFFFFFFFFFC18458FEFFFFFF00FFFFFF00CE93 - 5FD8FFFFFFFFEDC49CFFEDC49CFFEDC49CFFEDC49BFFEDC49BFFEDC49BFFEDC4 - 9BFFEDC49BFFEDC49BFFEDC49BFFFFFFFFFFC68C61F8FFFFFF00FFFFFF00CE93 - 5F9BFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFD6AA89FFFFFFFF00FFFFFF00CE93 - 5F71CE935F90CE935FCCCE935FFFCD935FFECD925FFFCC905FFFCD9261FFCD93 - 63FFCB9161FFCB8E5FEFCA9264CBD8AE8BFFD7AC8BFFFFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF - FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00 - } ImageIndex = 31 end end diff --git a/src/ce_main.pas b/src/ce_main.pas index 5fbddb82..5bbbea92 100644 --- a/src/ce_main.pas +++ b/src/ce_main.pas @@ -16,7 +16,7 @@ uses ce_toolseditor, ce_procinput, ce_optionseditor, ce_symlist, ce_mru, ce_processes, ce_infos, ce_dubproject, ce_dialogs, ce_dubprojeditor,{$IFDEF UNIX} ce_gdb,{$ENDIF} ce_dfmt, ce_lcldragdrop, ce_projgroup, ce_projutils, ce_stringrange, ce_dastworx, - ce_halstead, ce_profileviewer, ce_semver; + ce_halstead, ce_profileviewer, ce_semver, ce_dsgncontrols; type @@ -563,6 +563,7 @@ type fSplitterScrollSpeed: byte; fAutoCheckUpdates: boolean; fShowBuildDuration: boolean; + fToolBarScaling: TToolBarScaling; function getConsoleProgram: string; procedure setConsoleProgram(const value: string); function getAdditionalPATH: string; @@ -586,6 +587,7 @@ type property flatLook: boolean read fFlatLook write fFlatLook; property splitterScrollSpeed: byte read fSplitterScrollSpeed write setSplitterScsrollSpeed; property showBuildDuration: boolean read fShowBuildDuration write fShowBuildDuration default false; + property toolBarScaling: TToolBarScaling read fToolBarScaling write fToolBarScaling stored false; // published for ICEEditableOptions but stored by DCD wrapper since it reloads before CEMainForm property dcdPort: word read fDcdPort write fDcdPort stored false; end; @@ -875,6 +877,7 @@ begin fAutoCheckUpdates:= fBackup.fAutoCheckUpdates; CEMainForm.fDscanUnittests := fDscanUnittests; nativeProjectCompiler:= fBackup.nativeProjectCompiler; + fToolBarScaling:= fBackup.fToolBarScaling; end else inherited; end; @@ -893,7 +896,10 @@ begin CEMainForm.fDscanUnittests := fDscanUnittests; DcdWrapper.port:=fDcdPort; for i := 0 to CEMainForm.fWidgList.Count-1 do + begin CEMainForm.fWidgList.widget[i].toolbarFlat:=fFlatLook; + CEMainForm.fWidgList.widget[i].toolbar.Scaling:= fToolBarScaling; + end; end else if target = fBackup then begin @@ -907,6 +913,7 @@ begin fBackup.fAutoSaveProjectFiles:= fAutoSaveProjectFiles; fBackup.fDscanUnittests:= fDscanUnittests; fBackup.fFlatLook:= fFlatLook; + fBackup.fToolBarScaling:= fToolBarScaling; fBackup.fAutoCheckUpdates:= fAutoCheckUpdates; fBackup.fShowBuildDuration:= fShowBuildDuration; fBackup.nativeProjectCompiler:= nativeProjectCompiler; diff --git a/src/ce_symlist.lfm b/src/ce_symlist.lfm index 60f542e0..0faf39a6 100644 --- a/src/ce_symlist.lfm +++ b/src/ce_symlist.lfm @@ -13,16 +13,15 @@ inherited CESymbolListWidget: TCESymbolListWidget ClientHeight = 430 ClientWidth = 382 inherited Content: TPanel - Height = 396 - Top = 34 + Height = 394 + Top = 36 Width = 382 - AutoSize = True - ClientHeight = 396 + ClientHeight = 394 ClientWidth = 382 PopupMenu = nil object Tree: TTreeView[0] Left = 4 - Height = 388 + Height = 386 Top = 4 Width = 374 Align = alClient @@ -59,11 +58,9 @@ inherited CESymbolListWidget: TCESymbolListWidget end end inherited toolbar: TCEToolBar - Height = 28 Width = 374 - AutoSize = True object btnRefresh: TCEToolButton[0] - Left = 1 + Left = 372 Hint = 'refresh the symbol list' Top = 0 AutoSize = True @@ -73,17 +70,16 @@ inherited CESymbolListWidget: TCESymbolListWidget scaledSeparator = False end object TreeFilterEdit1: TTreeFilterEdit[1] - Left = 33 - Height = 24 + Left = 3 + Height = 26 Hint = 'filter the symbols that contain the text typed here' Top = 2 - Width = 339 + Width = 369 OnAfterFilter = TreeFilterEdit1AfterFilter OnFilterItem = TreeFilterEdit1FilterItem ButtonWidth = 28 NumGlyphs = 1 Align = alClient - BorderSpacing.Left = 30 BorderSpacing.Around = 2 MaxLength = 0 TabOrder = 0 diff --git a/src/ce_symlist.pas b/src/ce_symlist.pas index 0ba9ce41..7f16b76e 100644 --- a/src/ce_symlist.pas +++ b/src/ce_symlist.pas @@ -358,6 +358,7 @@ begin // allow empty name if owner is nil fSyms := TSymbolList.create(nil); // + TreeFilterEdit1.BorderSpacing.Left:= ScaleX(30,96); fOptions := TCESymbolListOptions.Create(self); fOptions.Name:= 'symbolListOptions'; fname := getCoeditDocPath + OptsFname; diff --git a/src/ce_widget.lfm b/src/ce_widget.lfm index 247e9a76..11550422 100644 --- a/src/ce_widget.lfm +++ b/src/ce_widget.lfm @@ -23,8 +23,8 @@ object CEWidget: TCEWidget TabOrder = 0 object Content: TPanel Left = 0 - Height = 85 - Top = 36 + Height = 83 + Top = 38 Width = 332 Align = alClient AutoSize = True @@ -34,10 +34,8 @@ object CEWidget: TCEWidget end object toolbar: TCEToolBar Left = 4 - Height = 30 Top = 4 Width = 324 - AutoSize = True BorderSpacing.Left = 2 BorderSpacing.Top = 2 BorderSpacing.Right = 2