gtk2: invert define GtkNoWindowFixed to GtkFixedWithWindow (and enable code for fixed w/o window by default). As result TCustomPage and TGroupBox will look nicer under gtk2

git-svn-id: trunk@12979 -
This commit is contained in:
paul 2007-11-23 10:04:16 +00:00
parent 7de8d9ad08
commit 7e9d843fe8
3 changed files with 12 additions and 13 deletions

View File

@ -7861,7 +7861,7 @@ var
Result:=gtk_notebook_new;
NoteBookWidget := PGtkNoteBook(Result);
//NoteBookPageWidget := gtk_hbox_new(false, 0);
NoteBookPageClientAreaWidget := CreateFixedClientWidget{$IFDEF GtkNoWindowFixed}(false){$ENDIF};
NoteBookPageClientAreaWidget := CreateFixedClientWidget{$IFNDEF GtkFixedWithWindow}(false){$ENDIF};
gtk_widget_show(NoteBookPageClientAreaWidget);
//gtk_container_add(GTK_CONTAINER(NoteBookPageWidget),
// NoteBookPageClientAreaWidget);
@ -8064,7 +8064,7 @@ begin
If CompareText(WName,LazGtkStyleNames[lgsGroupBox])=0 then begin
lgs:=lgsGroupBox;
StyleObject^.Widget := gtk_frame_new('GroupBox');
WindowFixedWidget:=CreateFixedClientWidget{$IFDEF GtkNoWindowFixed}(false){$ENDIF};
WindowFixedWidget:=CreateFixedClientWidget{$IFNDEF GtkFixedWithWindow}(false){$ENDIF};
gtk_widget_show(WindowFixedWidget);
gtk_container_add(PGtkContainer(StyleObject^.Widget), WindowFixedWidget);
gtk_object_set_data(PGtkObject(StyleObject^.Widget),'fixedwidget',WindowFixedWidget);

View File

@ -4628,18 +4628,17 @@ var
TempWidget: PGtkWidget;
WinWidgetInfo: PWinWidgetInfo;
begin
{$ifdef gtk1}
{$undef GtkNoWindowFixed}
{$endif}
{$ifdef GtkNoWindowFixed}
{$if defined(gtk1) or defined(GtkFixedWithWindow)}
// Fixed + GdkWindow
Result := gtk_hbox_new(false, 0);
TempWidget := CreateFixedClientWidget;
{$else}
// Fixed w/o GdkWindow
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}
{$ifend}
gtk_container_add(GTK_CONTAINER(Result), TempWidget);
gtk_widget_show(TempWidget);
if NotOnParentsClientArea then
@ -5272,7 +5271,7 @@ begin
// -> add a dummy page
DummyWidget := gtk_hbox_new(false, 0);
{$IFDEF Gtk}
AWidget := CreateFixedClientWidget{$IFDEF GtkNoWindowFixed}(false){$ENDIF};
AWidget := CreateFixedClientWidget{$IFNDEF GtkFixedWithWindow}(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{$IFDEF GtkNoWindowFixed}(false){$ENDIF};
TempWidget := CreateFixedClientWidget{$IFNDEF GtkFixedWithWindow}(false){$ENDIF};
gtk_container_add(GTK_CONTAINER(p), TempWidget);
gtk_widget_show(TempWidget);
SetFixedWidget(p, TempWidget);