gtk2 intf: GtkNoWindowFixed: removed gdkwindows for groupboxes and notebooks

git-svn-id: trunk@12976 -
This commit is contained in:
mattias 2007-11-23 00:37:28 +00:00
parent 28578c3a91
commit 8f7f9fbebb
5 changed files with 12 additions and 10 deletions

View File

@ -1919,6 +1919,7 @@ begin
DebugLn('TCodeToolManager.GatherIdentifiers A ',Code.Filename,' x=',dbgs(x),' y=',dbgs(y));
{$ENDIF}
if not InitCurCodeTool(Code) then exit;
if IdentifierList<>nil then IdentifierList.Clear;
CursorPos.X:=X;
CursorPos.Y:=Y;
CursorPos.Code:=Code;

View File

@ -3828,7 +3828,8 @@ function CreateFixedClientWidget(WithWindow: Boolean = True): PGTKWidget;
begin
Result := gtk_fixed_new();
{$IFDEF GTK2}
gtk_fixed_set_has_window(PGtkFixed(Result), WithWindow);
if WithWindow then
gtk_fixed_set_has_window(PGtkFixed(Result), true);
{$ENDIF}
end;
@ -7860,7 +7861,7 @@ var
Result:=gtk_notebook_new;
NoteBookWidget := PGtkNoteBook(Result);
//NoteBookPageWidget := gtk_hbox_new(false, 0);
NoteBookPageClientAreaWidget := CreateFixedClientWidget(False);
NoteBookPageClientAreaWidget := CreateFixedClientWidget{$IFDEF GtkNoWindowFixed}(false){$ENDIF};
gtk_widget_show(NoteBookPageClientAreaWidget);
//gtk_container_add(GTK_CONTAINER(NoteBookPageWidget),
// NoteBookPageClientAreaWidget);
@ -8063,7 +8064,7 @@ begin
If CompareText(WName,LazGtkStyleNames[lgsGroupBox])=0 then begin
lgs:=lgsGroupBox;
StyleObject^.Widget := gtk_frame_new('GroupBox');
WindowFixedWidget:=CreateFixedClientWidget;
WindowFixedWidget:=CreateFixedClientWidget{$IFDEF GtkNoWindowFixed}(false){$ENDIF};
gtk_widget_show(WindowFixedWidget);
gtk_container_add(PGtkContainer(StyleObject^.Widget), WindowFixedWidget);
gtk_object_set_data(PGtkObject(StyleObject^.Widget),'fixedwidget',WindowFixedWidget);

View File

@ -367,7 +367,7 @@ function FindFixedLastChildListItem(ParentFixed: PGtkFixed): PGList;
function GetFixedChildListWidget(Item: PGList): PGtkWidget;
// fixed widgets
function CreateFixedClientWidget(WithWindow: Boolean = True): PGTKWidget;
function CreateFixedClientWidget(WithWindow: Boolean = true): PGTKWidget;
Procedure FixedMoveControl(Parent, Child: PGTKWidget; Left, Top: Longint);
Procedure FixedPutControl(Parent, Child: PGTKWidget; Left, Top: Longint);

View File

@ -4632,13 +4632,13 @@ begin
{$undef GtkNoWindowFixed}
{$endif}
{$ifndef GtkNoWindowFixed}
Result := gtk_hbox_new(false, 0);
TempWidget := CreateFixedClientWidget;
{$else}
{$ifdef GtkNoWindowFixed}
Result := gtk_event_box_new;
gtk_event_box_set_visible_window(PGtkEventBox(Result), False);
TempWidget := CreateFixedClientWidget(False);
{$else}
Result := gtk_hbox_new(false, 0);
TempWidget := CreateFixedClientWidget;
{$endif}
gtk_container_add(GTK_CONTAINER(Result), TempWidget);
gtk_widget_show(TempWidget);
@ -5272,7 +5272,7 @@ begin
// -> add a dummy page
DummyWidget := gtk_hbox_new(false, 0);
{$IFDEF Gtk}
AWidget := CreateFixedClientWidget;
AWidget := CreateFixedClientWidget{$IFDEF GtkNoWindowFixed}(false){$ENDIF};
gtk_widget_show(AWidget);
//gtk_box_pack_start_defaults(GTK_BOX(DummyWidget),AWidget);
gtk_container_add(GTK_CONTAINER(DummyWidget), AWidget);

View File

@ -1644,7 +1644,7 @@ var
p : pointer; // ptr to the newly created GtkWidget
begin
P := gtk_frame_new (AParams.Caption);
TempWidget := CreateFixedClientWidget;
TempWidget := CreateFixedClientWidget{$IFDEF GtkNoWindowFixed}(false){$ENDIF};
gtk_container_add(GTK_CONTAINER(p), TempWidget);
gtk_widget_show(TempWidget);
SetFixedWidget(p, TempWidget);