moved InvalidatePreferredSize from gtk intf to lcl

git-svn-id: trunk@7279 -
This commit is contained in:
mattias 2005-06-25 01:42:38 +00:00
parent ff9a280e4c
commit eb7ec65675
3 changed files with 19 additions and 6 deletions

View File

@ -105,8 +105,10 @@ procedure TCustomStaticText.SetShowAccelChar(Val: boolean);
begin
if Val <> FShowAccelChar then begin
FShowAccelChar:= Val;
if HandleAllocated then
if HandleAllocated then begin
TWSWinControlClass(WidgetSetClass).SetText(Self,Caption);
InvalidatePreferredSize;
end;
end;
end;
@ -144,6 +146,9 @@ end;
{ =============================================================================
$Log$
Revision 1.15 2005/06/25 01:42:38 mattias
moved InvalidatePreferredSize from gtk intf to lcl
Revision 1.14 2005/06/24 14:03:33 mattias
added some anchorside autosizing, activated new generic autosizing, removed old special DoAutoSize methods

View File

@ -3885,8 +3885,10 @@ begin
EnableWindow(Handle, Enabled);
// Delay the setting of text until it is completely loaded
if not (csLoading in ComponentState)
then TWSWinControlClass(WidgetSetClass).SetText(Self, FCaption);
if not (csLoading in ComponentState) then begin
TWSWinControlClass(WidgetSetClass).SetText(Self, FCaption);
InvalidatePreferredSize;
end;
// send pending resize event
Resize;
@ -3957,6 +3959,7 @@ begin
then begin
// Set cached caption
TWSWinControlClass(WidgetSetClass).SetText(Self, FCaption);
InvalidatePreferredSize;
if [wcfColorChanged,wcfFontChanged]*FWinControlFlags<>[] then
begin
@ -4390,7 +4393,10 @@ procedure TWinControl.RealSetText(const AValue: TCaption);
begin
if HandleAllocated
and (not (csLoading in ComponentState))
then TWSWinControlClass(WidgetSetClass).SetText(Self, AValue);
then begin
TWSWinControlClass(WidgetSetClass).SetText(Self, AValue);
InvalidatePreferredSize;
end;
inherited RealSetText(AValue);
end;
@ -4507,6 +4513,9 @@ end;
{ =============================================================================
$Log$
Revision 1.327 2005/06/25 01:42:38 mattias
moved InvalidatePreferredSize from gtk intf to lcl
Revision 1.326 2005/06/24 14:03:33 mattias
added some anchorside autosizing, activated new generic autosizing, removed old special DoAutoSize methods

View File

@ -178,7 +178,6 @@ var
begin
if not WSCheckHandleAllocated(AWincontrol, 'SetText')
then Exit;
AWinControl.InvalidatePreferredSize;
BtnWidget := PGtkButton(AWinControl.Handle);
{$IFDEF GTK2}