mirror of https://gitlab.com/basile.b/dexed.git
toolbar, handle dropdown buttons
This commit is contained in:
parent
0a80061d92
commit
c9f325c87f
|
@ -92,7 +92,7 @@ begin
|
||||||
fResourceName:=value;
|
fResourceName:=value;
|
||||||
if csDesigning in ComponentState then
|
if csDesigning in ComponentState then
|
||||||
exit;
|
exit;
|
||||||
if Style = tbsButton then
|
if Style in [tbsButton, tbsDropDown] then
|
||||||
begin
|
begin
|
||||||
fPng.FreeImage;
|
fPng.FreeImage;
|
||||||
fPng.LoadFromResourceName(HINSTANCE, fResourceName);
|
fPng.LoadFromResourceName(HINSTANCE, fResourceName);
|
||||||
|
@ -146,9 +146,11 @@ var
|
||||||
x, y: integer;
|
x, y: integer;
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
if (fResourceName <> '') and (style = tbsButton) then
|
if (fResourceName <> '') and (style in [tbsButton, tbsDropDown]) then
|
||||||
begin
|
begin
|
||||||
rc := ClientRect;
|
rc := ClientRect;
|
||||||
|
if Style = tbsDropDown then
|
||||||
|
rc.Right := rc.left + FToolBar.ButtonWidth;
|
||||||
x := ((rc.Right - rc.Left) - fPng.width) div 2;
|
x := ((rc.Right - rc.Left) - fPng.width) div 2;
|
||||||
y := ((rc.Bottom - rc.Top) - fPng.Height) div 2;
|
y := ((rc.Bottom - rc.Top) - fPng.Height) div 2;
|
||||||
if Enabled then
|
if Enabled then
|
||||||
|
|
Loading…
Reference in New Issue