mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-11 22:37:28 +02:00
removed some unneeded component styles
git-svn-id: trunk@13460 -
This commit is contained in:
parent
9233f84d8e
commit
6055944e29
@ -40,9 +40,7 @@ const
|
||||
------------------------------------------------------------------------------}
|
||||
constructor TCustomSpeedButton.Create(AOwner: TComponent);
|
||||
begin
|
||||
Inherited Create(AOwner);
|
||||
FCompStyle := csSpeedButton;
|
||||
|
||||
inherited Create(AOwner);
|
||||
FGlyph := TButtonGlyph.Create;
|
||||
FGlyph.OnChange := @GlyphChanged;
|
||||
|
||||
|
@ -62,7 +62,6 @@ begin
|
||||
FNewStyle := True;
|
||||
FWrapable := True;
|
||||
FButtons := TList.Create;
|
||||
fCompStyle := csToolbar;
|
||||
FIndent := 1;
|
||||
FList:=false;
|
||||
FImageChangeLink := TChangeLink.Create;
|
||||
|
@ -56,7 +56,6 @@ end;
|
||||
constructor TToolButton.Create(TheOwner: TComponent);
|
||||
begin
|
||||
inherited Create(TheOwner);
|
||||
fCompStyle := csToolButton;
|
||||
FImageIndex := -1;
|
||||
FStyle := tbsButton;
|
||||
ControlStyle := [csCaptureMouse, csSetCaption, csDesignNoSmoothResize];
|
||||
|
@ -4771,7 +4771,7 @@ begin
|
||||
csFontDialog :
|
||||
InitializeFontDialog(TFontDialog(Sender),p,PChar(ACaption));
|
||||
|
||||
csWinControl:
|
||||
csWinControl: // code moved for TCustomControl
|
||||
p:=CreateAPIWidget(TWinControl(Sender));
|
||||
|
||||
|
||||
@ -4815,29 +4815,11 @@ begin
|
||||
gtk_object_set_data(PGTKObject(Adjustment), odnScrollBar, P);
|
||||
end;
|
||||
|
||||
csScrolledWindow :
|
||||
begin
|
||||
P := gtk_scrolled_window_new(nil,nil);
|
||||
end;
|
||||
|
||||
csSpeedButton:
|
||||
Begin
|
||||
p := gtk_button_new_with_label(PChar(ACaption));
|
||||
end;
|
||||
|
||||
csStatusBar :
|
||||
begin
|
||||
p:=CreateStatusBar(Sender);
|
||||
end;
|
||||
|
||||
csToolbar:
|
||||
P:=CreateToolBar(Sender);
|
||||
|
||||
csToolButton:
|
||||
begin
|
||||
p := CreateFixedClientWidget;
|
||||
end;
|
||||
|
||||
csTrackBar:
|
||||
with (TCustomTrackBar (Sender)) do
|
||||
begin
|
||||
|
@ -552,24 +552,24 @@ end;
|
||||
|
||||
Shows or hides a control
|
||||
------------------------------------------------------------------------------}
|
||||
Procedure TWin32WidgetSet.ShowHide(Sender: TObject);
|
||||
Var
|
||||
procedure TWin32WidgetSet.ShowHide(Sender: TObject);
|
||||
var
|
||||
Handle: HWND;
|
||||
ParentPanel: HWND;
|
||||
Flags: dword;
|
||||
Begin
|
||||
If (TControl(Sender).FCompStyle = csToolButton) then exit;
|
||||
begin
|
||||
Handle := ObjectToHWND(Sender);
|
||||
ParentPanel := GetWindowInfo(Handle)^.ParentPanel;
|
||||
if ParentPanel <> 0 then
|
||||
Handle := ParentPanel;
|
||||
If TControl(Sender).HandleObjectShouldBeVisible Then
|
||||
Begin
|
||||
if TControl(Sender).HandleObjectShouldBeVisible then
|
||||
begin
|
||||
Assert(False, 'Trace: [TWin32WidgetSet.ShowHide] Showing the window');
|
||||
if TControl(Sender).FCompStyle = csHintWindow then
|
||||
begin
|
||||
Windows.SetWindowPos(Handle, HWND_TOPMOST, 0, 0, 0, 0, SWP_SHOWWINDOW or SWP_NOMOVE or SWP_NOSIZE or SWP_NOACTIVATE or SWP_NOOWNERZORDER);
|
||||
end else begin
|
||||
end else
|
||||
begin
|
||||
Flags := SW_SHOW;
|
||||
if TControl(Sender) is TCustomForm then
|
||||
case TCustomForm(Sender).WindowState of
|
||||
@ -582,15 +582,15 @@ Begin
|
||||
if Flags = SW_SHOWMAXIMIZED then
|
||||
Windows.SendMessage(Handle, WM_SHOWWINDOW, 1, 0);
|
||||
end;
|
||||
If (Sender Is TCustomForm) Then
|
||||
if (Sender Is TCustomForm) then
|
||||
SetClassLong(Handle, GCL_HICON, LONG(TCustomForm(Sender).GetIconHandle));
|
||||
End
|
||||
Else
|
||||
Begin
|
||||
end
|
||||
else
|
||||
begin
|
||||
Assert(False, 'TRACE: [TWin32WidgetSet.ShowHide] Hiding the window');
|
||||
ShowWindow(Handle, SW_HIDE);
|
||||
End;
|
||||
End;
|
||||
end;
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
Method: TWin32WidgetSet.DCReDraw
|
||||
|
@ -2406,11 +2406,11 @@ const
|
||||
csWinControl = 40;
|
||||
csFixed = csWinControl; //TODO remove
|
||||
csImage = 41;
|
||||
csToolbar = 42;
|
||||
csToolButton = 43;
|
||||
// csToolbar = 42;
|
||||
// csToolButton = 43;
|
||||
csBitBtn = 44;
|
||||
csCListBox = 45;
|
||||
csSpeedButton = 46;
|
||||
// csSpeedButton = 46;
|
||||
csPopupMenu = 47;
|
||||
csHintWindow = 48;
|
||||
|
||||
@ -2740,16 +2740,16 @@ Begin
|
||||
Result := 'csFixed';
|
||||
csImage:
|
||||
Result := 'csImage';
|
||||
csToolbar:
|
||||
{ csToolbar:
|
||||
Result := 'csToolbar';
|
||||
csToolButton:
|
||||
Result := 'csToolButton';
|
||||
Result := 'csToolButton';}
|
||||
csBitBtn:
|
||||
Result := 'csBitBtn';
|
||||
csCListBox:
|
||||
Result := 'csCListBox';
|
||||
csSpeedButton:
|
||||
Result := 'csSpeedButton';
|
||||
{ csSpeedButton:
|
||||
Result := 'csSpeedButton';}
|
||||
csPopupMenu:
|
||||
Result := 'csPopupMenu';
|
||||
csHintWinDow:
|
||||
|
Loading…
Reference in New Issue
Block a user