diff options
Diffstat (limited to 'bundles')
7 files changed, 13 insertions, 18 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/internal/ImageList.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/internal/ImageList.java index 92daa455e2..b694c2208a 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/internal/ImageList.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/internal/ImageList.java @@ -44,13 +44,7 @@ public ImageList (int style) { } } } - /* - * Feature in Windows. The ILC_MIRROR flag only mirrors the images in the ImageList - * when they are about to be drawn, and only if the layout of the graphic context is - * mirrored. For that reason ILC_MIRROR always can be set. This also allows changing - * the orientation of widgets without recreating its image lists. - */ - flags |= OS.ILC_MIRROR; + if ((style & SWT.RIGHT_TO_LEFT) != 0) flags |= OS.ILC_MIRROR; handle = OS.ImageList_Create (32, 32, flags, 16, 16); images = new Image [4]; } diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Button.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Button.java index ebf890aae4..d05f1c9e1c 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Button.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Button.java @@ -122,7 +122,7 @@ void _setImage (Image image) { if (imageList != null) imageList.dispose (); imageList = null; if (image != null) { - imageList = new ImageList (SWT.NONE); + imageList = new ImageList (style & SWT.RIGHT_TO_LEFT); if (OS.IsWindowEnabled (handle)) { imageList.add (image); } else { @@ -608,7 +608,7 @@ void enableWidget (boolean enabled) { BUTTON_IMAGELIST buttonImageList = new BUTTON_IMAGELIST (); OS.SendMessage (handle, OS.BCM_GETIMAGELIST, 0, buttonImageList); if (imageList != null) imageList.dispose (); - imageList = new ImageList (SWT.NONE); + imageList = new ImageList (style & SWT.RIGHT_TO_LEFT); if (OS.IsWindowEnabled (handle)) { imageList.add (image); } else { diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Menu.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Menu.java index 0d9366be5e..2b790ea58f 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Menu.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Menu.java @@ -1034,7 +1034,7 @@ int imageIndex (Image image) { if (hwndCB == 0 || image == null) return OS.I_IMAGENONE; if (imageList == null) { Rectangle bounds = image.getBounds (); - imageList = display.getImageList (SWT.NONE, bounds.width, bounds.height); + imageList = display.getImageList (style & SWT.RIGHT_TO_LEFT, bounds.width, bounds.height); int index = imageList.add (image); int /*long*/ hImageList = imageList.getHandle (); OS.SendMessage (hwndCB, OS.TB_SETIMAGELIST, 0, hImageList); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TabFolder.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TabFolder.java index 9952ff4010..17b81f95d9 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TabFolder.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TabFolder.java @@ -465,7 +465,7 @@ int imageIndex (Image image) { if (image == null) return OS.I_IMAGENONE; if (imageList == null) { Rectangle bounds = image.getBounds (); - imageList = display.getImageList (SWT.NONE, bounds.width, bounds.height); + imageList = display.getImageList (style & SWT.RIGHT_TO_LEFT, bounds.width, bounds.height); int index = imageList.add (image); int /*long*/ hImageList = imageList.getHandle (); OS.SendMessage (handle, OS.TCM_SETIMAGELIST, 0, hImageList); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Table.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Table.java index 74e2aaae40..f0863627cc 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Table.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Table.java @@ -2893,7 +2893,7 @@ int imageIndex (Image image, int column) { } if (imageList == null) { Rectangle bounds = image.getBounds (); - imageList = display.getImageList (SWT.NONE, bounds.width, bounds.height); + imageList = display.getImageList (style & SWT.RIGHT_TO_LEFT, bounds.width, bounds.height); int index = imageList.indexOf (image); if (index == -1) index = imageList.add (image); int /*long*/ hImageList = imageList.getHandle (); @@ -2934,7 +2934,7 @@ int imageIndexHeader (Image image) { if (image == null) return OS.I_IMAGENONE; if (headerImageList == null) { Rectangle bounds = image.getBounds (); - headerImageList = display.getImageList (SWT.NONE, bounds.width, bounds.height); + headerImageList = display.getImageList (style & SWT.RIGHT_TO_LEFT, bounds.width, bounds.height); int index = headerImageList.indexOf (image); if (index == -1) index = headerImageList.add (image); int /*long*/ hImageList = headerImageList.getHandle (); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ToolItem.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ToolItem.java index 707ede61e0..7d847e5b08 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ToolItem.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ToolItem.java @@ -909,14 +909,15 @@ void updateImages (boolean enabled) { ImageList disabledImageList = parent.getDisabledImageList(); if (info.iImage == OS.I_IMAGENONE) { Rectangle bounds = image.getBounds (); + int listStyle = parent.style & SWT.RIGHT_TO_LEFT; if (imageList == null) { - imageList = display.getImageListToolBar (SWT.NONE, bounds.width, bounds.height); + imageList = display.getImageListToolBar (listStyle, bounds.width, bounds.height); } if (disabledImageList == null) { - disabledImageList = display.getImageListToolBarDisabled (SWT.NONE, bounds.width, bounds.height); + disabledImageList = display.getImageListToolBarDisabled (listStyle, bounds.width, bounds.height); } if (hotImageList == null) { - hotImageList = display.getImageListToolBarHot (SWT.NONE, bounds.width, bounds.height); + hotImageList = display.getImageListToolBarHot (listStyle, bounds.width, bounds.height); } Image disabled = disabledImage; if (disabledImage == null) { diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tree.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tree.java index ba9f19506b..a7743783cd 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tree.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tree.java @@ -3637,7 +3637,7 @@ int imageIndex (Image image, int index) { if (image == null) return OS.I_IMAGENONE; if (imageList == null) { Rectangle bounds = image.getBounds (); - imageList = display.getImageList (SWT.NONE, bounds.width, bounds.height); + imageList = display.getImageList (style & SWT.RIGHT_TO_LEFT, bounds.width, bounds.height); } int imageIndex = imageList.indexOf (image); if (imageIndex == -1) imageIndex = imageList.add (image); @@ -3661,7 +3661,7 @@ int imageIndexHeader (Image image) { if (image == null) return OS.I_IMAGENONE; if (headerImageList == null) { Rectangle bounds = image.getBounds (); - headerImageList = display.getImageList (SWT.NONE, bounds.width, bounds.height); + headerImageList = display.getImageList (style & SWT.RIGHT_TO_LEFT, bounds.width, bounds.height); int index = headerImageList.indexOf (image); if (index == -1) index = headerImageList.add (image); int /*long*/ hImageList = headerImageList.getHandle (); |