diff options
| author | Snjezana Peco | 2015-05-21 08:41:39 +0000 |
|---|---|---|
| committer | Alexander Kurtakov | 2015-07-30 05:35:29 +0000 |
| commit | e32fa8a623210ebcb62b7d869996492857cb244c (patch) | |
| tree | 4083de75f71d4df8c826a8833b50955cd07f8362 | |
| parent | 314872d4ecacdf8c977c7b7edc58ba4039f6e3a6 (diff) | |
| download | eclipse.platform.swt-e32fa8a623210ebcb62b7d869996492857cb244c.tar.gz eclipse.platform.swt-e32fa8a623210ebcb62b7d869996492857cb244c.tar.xz eclipse.platform.swt-e32fa8a623210ebcb62b7d869996492857cb244c.zip | |
Bug 466499 - [GTK3] Path text not drawn in column of commit dialog window
Change-Id: I508432a354314ca11839e03fbac7b5adc44fff3c
Signed-off-by: Snjezana Peco <snjeza.peco@gmail.com>
| -rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java | 3 | ||||
| -rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java | 17 |
2 files changed, 6 insertions, 14 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java index 4ebe421159..77387d61da 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java @@ -2662,7 +2662,8 @@ void rendererRender (long /*int*/ cell, long /*int*/ cr, long /*int*/ window, lo } } if (item != null) { - if (OS.GTK_IS_CELL_RENDERER_TOGGLE (cell) || (OS.GTK_IS_CELL_RENDERER_PIXBUF (cell) && (columnIndex != 0 || (style & SWT.CHECK) == 0))) { + if (OS.GTK_IS_CELL_RENDERER_TOGGLE (cell) || + ( (OS.GTK_IS_CELL_RENDERER_PIXBUF (cell) || OS.GTK_VERSION > OS.VERSION(3, 13, 0)) && (columnIndex != 0 || (style & SWT.CHECK) == 0))) { drawFlags = (int)/*64*/flags; drawState = SWT.FOREGROUND; long /*int*/ [] ptr = new long /*int*/ [1]; diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java index 62fbf3d090..992bd1a47f 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java @@ -2675,7 +2675,8 @@ void rendererRender (long /*int*/ cell, long /*int*/ cr, long /*int*/ window, lo } } if (item != null) { - if (OS.GTK_IS_CELL_RENDERER_TOGGLE (cell) || (OS.GTK_IS_CELL_RENDERER_PIXBUF (cell) && (columnIndex != 0 || (style & SWT.CHECK) == 0))) { + if (OS.GTK_IS_CELL_RENDERER_TOGGLE (cell) || + ( (OS.GTK_IS_CELL_RENDERER_PIXBUF (cell) || OS.GTK_VERSION > OS.VERSION(3, 13, 0)) && (columnIndex != 0 || (style & SWT.CHECK) == 0))) { drawFlags = (int)/*64*/flags; drawState = SWT.FOREGROUND; long /*int*/ [] ptr = new long /*int*/ [1]; @@ -2772,9 +2773,6 @@ void rendererRender (long /*int*/ cell, long /*int*/ cr, long /*int*/ window, lo sendEvent (SWT.EraseItem, event); drawForeground = null; drawState = event.doit ? event.detail : 0; - if (OS.GTK3 && OS.GTK_VERSION <= OS.VERSION(3, 14, 8)) { - drawState |= SWT.FOREGROUND; - } drawFlags &= ~(OS.GTK_CELL_RENDERER_FOCUSED | OS.GTK_CELL_RENDERER_SELECTED); if ((drawState & SWT.SELECTED) != 0) drawFlags |= OS.GTK_CELL_RENDERER_SELECTED; if ((drawState & SWT.FOCUSED) != 0) drawFlags |= OS.GTK_CELL_RENDERER_FOCUSED; @@ -2818,10 +2816,8 @@ void rendererRender (long /*int*/ cell, long /*int*/ cr, long /*int*/ window, lo if (OS.GTK_IS_CELL_RENDERER_TEXT (cell)) { if (hooks (SWT.PaintItem)) { GdkRectangle rect = new GdkRectangle (); - GdkRectangle clipRect = new GdkRectangle (); long /*int*/ path = OS.gtk_tree_model_get_path (modelHandle, iter); OS.gtk_tree_view_get_cell_area (handle, path, columnHandle, rect); - OS.gtk_tree_view_get_background_area (handle, path, columnHandle, clipRect); OS.gtk_tree_path_free (path); // A workaround for https://bugs.eclipse.org/bugs/show_bug.cgi?id=459117 if (cr != 0 && OS.GTK_VERSION > OS.VERSION(3, 9, 0) && OS.GTK_VERSION <= OS.VERSION(3, 14, 8)) { @@ -2874,12 +2870,9 @@ void rendererRender (long /*int*/ cell, long /*int*/ cr, long /*int*/ window, lo gc.setFont (item.getFont (columnIndex)); if ((style & SWT.MIRRORED) != 0) { rect.x = getClientWidth () - rect.width - rect.x; - clipRect.x = getClientWidth () - clipRect.width - clipRect.x; } - if (!OS.GTK3){ - gc.setClipping (clipRect.x, clipRect.y, clipRect.width, clipRect.height); - } + gc.setClipping (rect.x, rect.y, rect.width, rect.height); Event event = new Event (); event.item = item; @@ -2890,9 +2883,7 @@ void rendererRender (long /*int*/ cell, long /*int*/ cr, long /*int*/ window, lo event.width = contentWidth [0]; event.height = rect.height; event.detail = drawState; - if (!OS.GTK3 || OS.GTK_VERSION > OS.VERSION(3, 14, 8)) { - sendEvent (SWT.PaintItem, event); - } + sendEvent(SWT.PaintItem, event); gc.dispose(); } } |
