diff --git a/lcl/include/speedbutton.inc b/lcl/include/speedbutton.inc index a99d8f585c..7d29f31760 100644 --- a/lcl/include/speedbutton.inc +++ b/lcl/include/speedbutton.inc @@ -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; diff --git a/lcl/include/toolbar.inc b/lcl/include/toolbar.inc index ab2026491d..1acfeb65b8 100644 --- a/lcl/include/toolbar.inc +++ b/lcl/include/toolbar.inc @@ -62,7 +62,6 @@ begin FNewStyle := True; FWrapable := True; FButtons := TList.Create; - fCompStyle := csToolbar; FIndent := 1; FList:=false; FImageChangeLink := TChangeLink.Create; diff --git a/lcl/include/toolbutton.inc b/lcl/include/toolbutton.inc index e5cbf5f473..de890a01a3 100644 --- a/lcl/include/toolbutton.inc +++ b/lcl/include/toolbutton.inc @@ -56,7 +56,6 @@ end; constructor TToolButton.Create(TheOwner: TComponent); begin inherited Create(TheOwner); - fCompStyle := csToolButton; FImageIndex := -1; FStyle := tbsButton; ControlStyle := [csCaptureMouse, csSetCaption, csDesignNoSmoothResize]; diff --git a/lcl/interfaces/gtk/gtkwidgetset.inc b/lcl/interfaces/gtk/gtkwidgetset.inc index c2f00c7a25..7fb861400c 100644 --- a/lcl/interfaces/gtk/gtkwidgetset.inc +++ b/lcl/interfaces/gtk/gtkwidgetset.inc @@ -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 diff --git a/lcl/interfaces/win32/win32object.inc b/lcl/interfaces/win32/win32object.inc index 4ce2cdfa5b..3cfe13d860 100644 --- a/lcl/interfaces/win32/win32object.inc +++ b/lcl/interfaces/win32/win32object.inc @@ -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 diff --git a/lcl/lcltype.pp b/lcl/lcltype.pp index b8c805f000..394f9d6e75 100644 --- a/lcl/lcltype.pp +++ b/lcl/lcltype.pp @@ -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: