mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-15 19:39:28 +02:00
moved InvalidatePreferredSize from gtk intf to lcl
git-svn-id: trunk@7279 -
This commit is contained in:
parent
ff9a280e4c
commit
eb7ec65675
@ -105,8 +105,10 @@ procedure TCustomStaticText.SetShowAccelChar(Val: boolean);
|
|||||||
begin
|
begin
|
||||||
if Val <> FShowAccelChar then begin
|
if Val <> FShowAccelChar then begin
|
||||||
FShowAccelChar:= Val;
|
FShowAccelChar:= Val;
|
||||||
if HandleAllocated then
|
if HandleAllocated then begin
|
||||||
TWSWinControlClass(WidgetSetClass).SetText(Self,Caption);
|
TWSWinControlClass(WidgetSetClass).SetText(Self,Caption);
|
||||||
|
InvalidatePreferredSize;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -144,6 +146,9 @@ end;
|
|||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
|
|
||||||
$Log$
|
$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
|
Revision 1.14 2005/06/24 14:03:33 mattias
|
||||||
added some anchorside autosizing, activated new generic autosizing, removed old special DoAutoSize methods
|
added some anchorside autosizing, activated new generic autosizing, removed old special DoAutoSize methods
|
||||||
|
|
||||||
|
@ -3885,8 +3885,10 @@ begin
|
|||||||
EnableWindow(Handle, Enabled);
|
EnableWindow(Handle, Enabled);
|
||||||
|
|
||||||
// Delay the setting of text until it is completely loaded
|
// Delay the setting of text until it is completely loaded
|
||||||
if not (csLoading in ComponentState)
|
if not (csLoading in ComponentState) then begin
|
||||||
then TWSWinControlClass(WidgetSetClass).SetText(Self, FCaption);
|
TWSWinControlClass(WidgetSetClass).SetText(Self, FCaption);
|
||||||
|
InvalidatePreferredSize;
|
||||||
|
end;
|
||||||
|
|
||||||
// send pending resize event
|
// send pending resize event
|
||||||
Resize;
|
Resize;
|
||||||
@ -3957,7 +3959,8 @@ begin
|
|||||||
then begin
|
then begin
|
||||||
// Set cached caption
|
// Set cached caption
|
||||||
TWSWinControlClass(WidgetSetClass).SetText(Self, FCaption);
|
TWSWinControlClass(WidgetSetClass).SetText(Self, FCaption);
|
||||||
|
InvalidatePreferredSize;
|
||||||
|
|
||||||
if [wcfColorChanged,wcfFontChanged]*FWinControlFlags<>[] then
|
if [wcfColorChanged,wcfFontChanged]*FWinControlFlags<>[] then
|
||||||
begin
|
begin
|
||||||
TWSWinControlClass(WidgetSetClass).SetColor(Self);
|
TWSWinControlClass(WidgetSetClass).SetColor(Self);
|
||||||
@ -4390,7 +4393,10 @@ procedure TWinControl.RealSetText(const AValue: TCaption);
|
|||||||
begin
|
begin
|
||||||
if HandleAllocated
|
if HandleAllocated
|
||||||
and (not (csLoading in ComponentState))
|
and (not (csLoading in ComponentState))
|
||||||
then TWSWinControlClass(WidgetSetClass).SetText(Self, AValue);
|
then begin
|
||||||
|
TWSWinControlClass(WidgetSetClass).SetText(Self, AValue);
|
||||||
|
InvalidatePreferredSize;
|
||||||
|
end;
|
||||||
inherited RealSetText(AValue);
|
inherited RealSetText(AValue);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -4507,6 +4513,9 @@ end;
|
|||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
|
|
||||||
$Log$
|
$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
|
Revision 1.326 2005/06/24 14:03:33 mattias
|
||||||
added some anchorside autosizing, activated new generic autosizing, removed old special DoAutoSize methods
|
added some anchorside autosizing, activated new generic autosizing, removed old special DoAutoSize methods
|
||||||
|
|
||||||
|
@ -178,7 +178,6 @@ var
|
|||||||
begin
|
begin
|
||||||
if not WSCheckHandleAllocated(AWincontrol, 'SetText')
|
if not WSCheckHandleAllocated(AWincontrol, 'SetText')
|
||||||
then Exit;
|
then Exit;
|
||||||
AWinControl.InvalidatePreferredSize;
|
|
||||||
|
|
||||||
BtnWidget := PGtkButton(AWinControl.Handle);
|
BtnWidget := PGtkButton(AWinControl.Handle);
|
||||||
{$IFDEF GTK2}
|
{$IFDEF GTK2}
|
||||||
|
Loading…
Reference in New Issue
Block a user