mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-16 23:40:54 +01:00
win32: don't constraint and autosize csSimple combobox
git-svn-id: trunk@14242 -
This commit is contained in:
parent
e43614c705
commit
3d629400eb
@ -316,7 +316,8 @@ begin
|
|||||||
else
|
else
|
||||||
if SizeConstraints.Control is TCustomComboBox then
|
if SizeConstraints.Control is TCustomComboBox then
|
||||||
begin
|
begin
|
||||||
FixedHeight := True; // win32 combo has fixed height
|
// win32 combo (bug not csSimple) has fixed height
|
||||||
|
FixedHeight := TCustomComboBox(SizeConstraints.Control).Style <> csSimple;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if (FixedHeight or FixedWidth)
|
if (FixedHeight or FixedWidth)
|
||||||
|
|||||||
@ -794,16 +794,10 @@ class procedure TWin32WSCustomComboBox.GetPreferredSize(
|
|||||||
const AWinControl: TWinControl; var PreferredWidth, PreferredHeight: integer;
|
const AWinControl: TWinControl; var PreferredWidth, PreferredHeight: integer;
|
||||||
WithThemeSpace: Boolean);
|
WithThemeSpace: Boolean);
|
||||||
begin
|
begin
|
||||||
if not AWinControl.HandleAllocated then
|
|
||||||
begin
|
|
||||||
// any idea about?
|
|
||||||
PreferredHeight := 0;
|
PreferredHeight := 0;
|
||||||
end
|
if (AWinControl.HandleAllocated) and (TCustomComboBox(AWinControl).Style <> csSimple) then
|
||||||
else
|
|
||||||
begin
|
|
||||||
PreferredHeight := AWinControl.Height;
|
PreferredHeight := AWinControl.Height;
|
||||||
end;
|
end;
|
||||||
end;
|
|
||||||
|
|
||||||
class function TWin32WSCustomComboBox.GetSelStart(const ACustomComboBox: TCustomComboBox): integer;
|
class function TWin32WSCustomComboBox.GetSelStart(const ACustomComboBox: TCustomComboBox): integer;
|
||||||
begin
|
begin
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user