diff options
| author | Tomas Bzatek <tbzatek@users.sourceforge.net> | 2010-01-04 21:16:27 +0100 |
|---|---|---|
| committer | Tomas Bzatek <tbzatek@users.sourceforge.net> | 2010-01-04 21:16:27 +0100 |
| commit | bd94bf0ea362376243e98ed509fbe8c5028ff4b2 (patch) | |
| tree | 8e8b2a66de8148f32a71358751da578f59e7ce50 /UMain.pas | |
| parent | 11b4760a97865a796e63cb71b7cbda71a480e336 (diff) | |
| download | tuxcmd-bd94bf0ea362376243e98ed509fbe8c5028ff4b2.tar.xz | |
Enable GtkTreeView fixed height mode by default
This possibly brings noticeable performance increase when filling panel items.
There were some issues in the past, now with gtk+-2.18 I can't see any.
Diffstat (limited to 'UMain.pas')
| -rw-r--r-- | UMain.pas | 14 |
1 files changed, 4 insertions, 10 deletions
@@ -1064,14 +1064,7 @@ begin Column.Caption := ConfColumnTitlesShort[ConfColumnIDs[i]]; - if (i < LastColumn){ or Application.GTKVersion_2_4_0_Up} then begin -{ Column.MinWidth := 10; - Column.MaxWidth := 500; } -{ Column.SizingMode := smFixed; - Column.FixedWidth := ConfColumnSizes[i]; } - g_object_set(G_OBJECT(Column.FColumn), 'sizing', 2, 'fixed-width', ConfColumnSizes[i], nil); - end else g_object_set(G_OBJECT(Column.FColumn), 'sizing', 0, nil); - // Column.SizingMode := smFixed; // smAutoSize; + g_object_set(G_OBJECT(Column.FColumn), 'sizing', 2, 'fixed-width', ConfColumnSizes[i], nil); gtk_tree_view_column_set_spacing(Column.FColumn, 1); // Bug with column spacing? @@ -1107,8 +1100,9 @@ begin gtk_widget_modify_font(ListView.FWidget, FontDesc); end else gtk_widget_modify_font(ListView.FWidget, nil); - // Set the fixed row height - temporarily disabled due to bug in custom drawing -// if Application.GTKVersion_2_4_0_Up then g_object_set(ListView.FWidget, 'fixed_height_mode', integer(True), nil); + // Set the fixed row height - there were some issues with custom drawing in the past, now with 2.18 it looks all fine + if Application.GTKVersion_2_12_0_Up then + g_object_set(ListView.FWidget, 'fixed_height_mode', 1, nil); end; procedure TFMain.FormDestroy(Sender: TObject); |
