mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-11 20:40:45 +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
|
||||
if SizeConstraints.Control is TCustomComboBox then
|
||||
begin
|
||||
FixedHeight := True; // win32 combo has fixed height
|
||||
// win32 combo (bug not csSimple) has fixed height
|
||||
FixedHeight := TCustomComboBox(SizeConstraints.Control).Style <> csSimple;
|
||||
end;
|
||||
|
||||
if (FixedHeight or FixedWidth)
|
||||
|
||||
@ -794,15 +794,9 @@ class procedure TWin32WSCustomComboBox.GetPreferredSize(
|
||||
const AWinControl: TWinControl; var PreferredWidth, PreferredHeight: integer;
|
||||
WithThemeSpace: Boolean);
|
||||
begin
|
||||
if not AWinControl.HandleAllocated then
|
||||
begin
|
||||
// any idea about?
|
||||
PreferredHeight := 0;
|
||||
end
|
||||
else
|
||||
begin
|
||||
PreferredHeight := 0;
|
||||
if (AWinControl.HandleAllocated) and (TCustomComboBox(AWinControl).Style <> csSimple) then
|
||||
PreferredHeight := AWinControl.Height;
|
||||
end;
|
||||
end;
|
||||
|
||||
class function TWin32WSCustomComboBox.GetSelStart(const ACustomComboBox: TCustomComboBox): integer;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user