mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-01 09:29:35 +01:00
gtk2 intf: TToolBar is now a simnple hbox instead of a gtk_toolbar
git-svn-id: trunk@9476 -
This commit is contained in:
parent
22e3d017fb
commit
080df83b4c
@ -98,28 +98,8 @@ begin
|
||||
end;
|
||||
|
||||
procedure TToolBar.CreateParams(var Params: TCreateParams);
|
||||
{const
|
||||
TBSTYLE_TRANSPARENT = $8000; // IE4 style -this is not valid but still needed as a holder
|
||||
DefaultStyles =
|
||||
CCS_NOPARENTALIGN or CCS_NOMOVEY or CCS_NORESIZE or CCS_NODIVIDER;
|
||||
ListStyles: array[Boolean] of DWORD = (0, TBSTYLE_LIST);
|
||||
FlatStyles: array[Boolean] of DWORD = (0, TBSTYLE_FLAT);
|
||||
TransparentStyles: array[Boolean] of DWORD = (0, TBSTYLE_TRANSPARENT);}
|
||||
begin
|
||||
//FNewStyle := InitCommonControl(ICC_BAR_CLASSES);
|
||||
|
||||
inherited CreateParams(Params);
|
||||
|
||||
{CreateSubClass(Params, TOOLBARCLASSNAME);
|
||||
with Params do
|
||||
begin
|
||||
Style := Style or DefaultStyles or FlatStyles[FFlat] or ListStyles[FList]
|
||||
or TransparentStyles[FTransparent];
|
||||
if ShowCaptions then
|
||||
Style := Style or TBSTYLE_TRANSPARENT;
|
||||
WindowClass.style := WindowClass.style and
|
||||
not Cardinal(CS_HREDRAW or CS_VREDRAW);
|
||||
end;}
|
||||
end;
|
||||
|
||||
procedure TToolBar.CreateWnd;
|
||||
|
||||
@ -5196,16 +5196,20 @@ function TGtkWidgetSet.CreateToolBar(ToolBarObject: TObject): PGtkWidget;
|
||||
var
|
||||
ClientWidget: PGtkWidget;
|
||||
begin
|
||||
{$IFDEF GTK1}
|
||||
Result := gtk_toolbar_new();
|
||||
gtk_toolbar_set_space_size(PGTKToolbar(Result),0);
|
||||
gtk_toolbar_set_space_style(PGTKToolbar(Result),GTK_TOOLBAR_SPACE_EMPTY);
|
||||
ClientWidget := gtk_fixed_new();
|
||||
gtk_toolbar_insert_widget(PGTKToolbar(Result),ClientWidget,nil,nil,0);
|
||||
{$ELSE}
|
||||
Result := gtk_hbox_new(false,0);
|
||||
ClientWidget := gtk_fixed_new();
|
||||
gtk_container_add(GTK_CONTAINER(Result), ClientWidget);
|
||||
{$ENDIF}
|
||||
gtk_widget_show(ClientWidget);
|
||||
SetFixedWidget(Result,ClientWidget);
|
||||
SetMainWidget(Result,ClientWidget);
|
||||
{$IFDEF GTK1}
|
||||
gtk_toolbar_set_space_size(PGTKToolbar(Result),0);
|
||||
gtk_toolbar_set_space_style(PGTKToolbar(Result),GTK_TOOLBAR_SPACE_EMPTY);
|
||||
{$ENDIF GTK1}
|
||||
gtk_widget_show(Result);
|
||||
end;
|
||||
|
||||
|
||||
@ -455,7 +455,9 @@ initialization
|
||||
// RegisterWSComponent(TCustomUpDown, TGtkWSCustomUpDown);
|
||||
// RegisterWSComponent(TCustomUpDown, TGtkWSUpDown);
|
||||
// RegisterWSComponent(TCustomToolButton, TGtkWSToolButton);
|
||||
{$ifdef OldToolbar}
|
||||
RegisterWSComponent(TToolBar, TGtkWSToolBar);
|
||||
{$ENDIF}
|
||||
RegisterWSComponent(TCustomTrackBar, TGtkWSTrackBar);
|
||||
// RegisterWSComponent(TCustomTreeView, TGtkWSCustomTreeView);
|
||||
// RegisterWSComponent(TCustomTreeView, TGtkWSTreeView);
|
||||
|
||||
@ -222,7 +222,8 @@ type
|
||||
implementation
|
||||
|
||||
// Will be used commonly for ListViews and TreeViews
|
||||
procedure GetCommonTreeViewWidgets(ATreeViewHandle: PGtkWidget; var TVWidgets: PTVWidgets);
|
||||
procedure GetCommonTreeViewWidgets(ATreeViewHandle: PGtkWidget;
|
||||
var TVWidgets: PTVWidgets);
|
||||
var
|
||||
WidgetInfo: PWidgetInfo;
|
||||
begin
|
||||
@ -265,4 +266,4 @@ initialization
|
||||
// RegisterWSComponent(TCustomTreeView, TGtk2WSCustomTreeView);
|
||||
// RegisterWSComponent(TCustomTreeView, TGtk2WSTreeView);
|
||||
////////////////////////////////////////////////////
|
||||
end.
|
||||
end.
|
||||
|
||||
@ -41,7 +41,8 @@ interface
|
||||
{$endif}
|
||||
|
||||
uses
|
||||
Classes, Controls, SysUtils, GraphType, Graphics, LCLType, LCLIntf, StdCtrls;
|
||||
Classes, LCLProc, Controls, SysUtils, GraphType, Graphics, LCLType, LCLIntf,
|
||||
StdCtrls;
|
||||
|
||||
type
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user