allow toolbar to autoselect the 24 or 32 px version of the icon

This commit is contained in:
Basile Burg 2018-01-18 21:53:41 +01:00
parent 1dd4194293
commit 886418413f
9 changed files with 129 additions and 227 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@ -13,7 +13,7 @@
<DpiAware Value="True/PM"/>
</XPManifest>
<Icon Value="0"/>
<Resources Count="105">
<Resources Count="107">
<Resource_0 FileName="../icons/window/layout_add.png" Type="RCDATA" ResourceName="LAYOUT_ADD"/>
<Resource_1 FileName="../icons/window/layout.png" Type="RCDATA" ResourceName="LAYOUT"/>
<Resource_2 FileName="../icons/window/application_go.png" Type="RCDATA" ResourceName="APPLICATION_GO"/>
@ -119,6 +119,8 @@
<Resource_102 FileName="../icons/other/break_reached.png" Type="RCDATA" ResourceName="BREAK_REACHED"/>
<Resource_103 FileName="../icons/other/break_set.png" Type="RCDATA" ResourceName="BREAK_SET"/>
<Resource_104 FileName="../icons/other/debugger_inspect.png" Type="RCDATA" ResourceName="DEBUGGER_INSPECT"/>
<Resource_105 FileName="../icons/arrow/arrow_update32.png" Type="RCDATA" ResourceName="ARROW_UPDATE32"/>
<Resource_106 FileName="../icons/arrow/arrow_update24.png" Type="RCDATA" ResourceName="ARROW_UPDATE24"/>
</Resources>
</General>
<i18n>
@ -165,6 +167,10 @@
<IgnoredMessages idx5024="True"/>
</CompilerMessages>
<CustomOptions Value="-dDEBUG"/>
<OtherDefines Count="2">
<Define0 Value="RELEASE"/>
<Define1 Value="GTK_REMOVE_CLIPBOARD_NULL"/>
</OtherDefines>
</Other>
</CompilerOptions>
</Item2>

View File

@ -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
if fResourceName = value then
exit;
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
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-}
px := PRGBAQuad(fDPng.ScanLine[i]);
p := 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;
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;
if csDesigning in ComponentState then
exit;
if Style in [tbsButton, tbsDropDown] then
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;

View File

@ -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

View File

@ -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;

View File

@ -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

View File

@ -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;

View File

@ -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