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;
|
||||
if csDesigning in ComponentState then
|
||||
exit;
|
||||
if Style = tbsButton then
|
||||
if Style in [tbsButton, tbsDropDown] then
|
||||
begin
|
||||
fPng.FreeImage;
|
||||
fPng.LoadFromResourceName(HINSTANCE, fResourceName);
|
||||
|
@ -146,9 +146,11 @@ var
|
|||
x, y: integer;
|
||||
begin
|
||||
inherited;
|
||||
if (fResourceName <> '') and (style = tbsButton) then
|
||||
if (fResourceName <> '') and (style in [tbsButton, tbsDropDown]) then
|
||||
begin
|
||||
rc := ClientRect;
|
||||
if Style = tbsDropDown then
|
||||
rc.Right := rc.left + FToolBar.ButtonWidth;
|
||||
x := ((rc.Right - rc.Left) - fPng.width) div 2;
|
||||
y := ((rc.Bottom - rc.Top) - fPng.Height) div 2;
|
||||
if Enabled then
|
||||
|
|
Loading…
Reference in New Issue