diff options
author | Silenio Quarti <silenio_quarti@ca.ibm.com> | 2012-10-30 17:55:42 -0400 |
---|---|---|
committer | Silenio Quarti <silenio_quarti@ca.ibm.com> | 2012-10-30 17:55:42 -0400 |
commit | ccd2d5aea4fb2e484cfeea5d7ce086a6f7e68860 (patch) | |
tree | 150f22ca51340c4b93e96f23205564020a20c817 /bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Spinner.java | |
parent | 9e6ed5ddefaae266127428adb6c5fbedbb333dc4 (diff) | |
download | eclipse.platform.swt-ccd2d5aea4fb2e484cfeea5d7ce086a6f7e68860.tar.gz eclipse.platform.swt-ccd2d5aea4fb2e484cfeea5d7ce086a6f7e68860.tar.xz eclipse.platform.swt-ccd2d5aea4fb2e484cfeea5d7ce086a6f7e68860.zip |
Bug 389910 - Substitute GdkColor with GdkRGBA
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Spinner.java')
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Spinner.java | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Spinner.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Spinner.java index 088b217c06..9a0a61ef72 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Spinner.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Spinner.java @@ -240,10 +240,10 @@ public Point computeSize (int wHint, int hHint, boolean changed) { public Rectangle computeTrim (int x, int y, int width, int height) { checkWidget (); int xborder = 0, yborder = 0; - long /*int*/ style = OS.gtk_widget_get_style (handle); + Point thickness = getThickness (handle); if ((this.style & SWT.BORDER) != 0) { - xborder += OS.gtk_style_get_xthickness (style); - yborder += OS.gtk_style_get_ythickness (style); + xborder += thickness.x; + yborder += thickness.y; } int [] property = new int [1]; OS.gtk_widget_style_get (handle, OS.interior_focus, property, 0); @@ -252,7 +252,7 @@ public Rectangle computeTrim (int x, int y, int width, int height) { xborder += property [0]; yborder += property [0]; } - long /*int*/ fontDesc = OS.gtk_style_get_font_desc (style); + long /*int*/ fontDesc = getFontDescription (); int fontSize = OS.pango_font_description_get_size (fontDesc); int arrowSize = Math.max (OS.PANGO_PIXELS (fontSize), MIN_ARROW_WIDTH); arrowSize = arrowSize - arrowSize % 2; @@ -261,7 +261,7 @@ public Rectangle computeTrim (int x, int y, int width, int height) { trim.y -= yborder; trim.width += 2 * xborder; trim.height += 2 * yborder; - trim.width += arrowSize + (2 * OS.gtk_style_get_xthickness (style)); + trim.width += arrowSize + (2 * thickness.x); GtkBorder innerBorder = Display.getEntryInnerBorder (handle); trim.x -= innerBorder.left; trim.y -= innerBorder.top; @@ -374,9 +374,8 @@ GdkColor getBackgroundColor () { public int getBorderWidth () { checkWidget(); - long /*int*/ style = OS.gtk_widget_get_style (handle); if ((this.style & SWT.BORDER) != 0) { - return OS.gtk_style_get_xthickness (style); + return getThickness (handle).x; } return 0; } @@ -867,7 +866,9 @@ void removeVerifyListener (VerifyListener listener) { void setBackgroundColor (GdkColor color) { super.setBackgroundColor (color); - OS.gtk_widget_modify_base (handle, 0, color); + if (OS.GTK_VERSION < OS.VERSION (3, 0, 0)) { + OS.gtk_widget_modify_base (handle, 0, color); + } } void setCursor (long /*int*/ cursor) { |