directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r1197242 - /directory/studio/trunk/plugins/valueeditors/src/main/java/org/apache/directory/studio/valueeditors/image/ImageDialog.java
Date Thu, 03 Nov 2011 17:48:28 GMT
Author: pamarcelot
Date: Thu Nov  3 17:48:28 2011
New Revision: 1197242

URL: http://svn.apache.org/viewvc?rev=1197242&view=rev
Log:
Fixed an issue (at least on Mac OS X) where the image would not be displayed in the ImageDialog.

Modified:
    directory/studio/trunk/plugins/valueeditors/src/main/java/org/apache/directory/studio/valueeditors/image/ImageDialog.java

Modified: directory/studio/trunk/plugins/valueeditors/src/main/java/org/apache/directory/studio/valueeditors/image/ImageDialog.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/valueeditors/src/main/java/org/apache/directory/studio/valueeditors/image/ImageDialog.java?rev=1197242&r1=1197241&r2=1197242&view=diff
==============================================================================
--- directory/studio/trunk/plugins/valueeditors/src/main/java/org/apache/directory/studio/valueeditors/image/ImageDialog.java
(original)
+++ directory/studio/trunk/plugins/valueeditors/src/main/java/org/apache/directory/studio/valueeditors/image/ImageDialog.java
Thu Nov  3 17:48:28 2011
@@ -275,13 +275,13 @@ public class ImageDialog extends Dialog
         if ( currentImageRawData != null && currentImageRawData.length > 0 )
         {
             currentImageContainer = new Composite( tabFolder, SWT.NONE );
-            GridLayout currentLayout = new GridLayout( 1, false );
+            GridLayout currentLayout = new GridLayout();
             currentLayout.marginHeight = convertVerticalDLUsToPixels( IDialogConstants.VERTICAL_MARGIN
);
             currentLayout.marginWidth = convertHorizontalDLUsToPixels( IDialogConstants.HORIZONTAL_MARGIN
);
             currentLayout.verticalSpacing = convertVerticalDLUsToPixels( IDialogConstants.VERTICAL_SPACING
);
             currentLayout.horizontalSpacing = convertHorizontalDLUsToPixels( IDialogConstants.HORIZONTAL_SPACING
);
             currentImageContainer.setLayout( currentLayout );
-            currentImageContainer.setLayoutData( new GridData( GridData.FILL_HORIZONTAL )
);
+            currentImageContainer.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true,
false ) );
 
             currentImageLabel = createImageLabel( currentImageContainer );
 
@@ -343,13 +343,13 @@ public class ImageDialog extends Dialog
 
         // new image
         newImageContainer = new Composite( tabFolder, SWT.NONE );
-        GridLayout newLayout = new GridLayout( 1, false );
+        GridLayout newLayout = new GridLayout();
         newLayout.marginHeight = convertVerticalDLUsToPixels( IDialogConstants.VERTICAL_MARGIN
);
         newLayout.marginWidth = convertHorizontalDLUsToPixels( IDialogConstants.HORIZONTAL_MARGIN
);
         newLayout.verticalSpacing = convertVerticalDLUsToPixels( IDialogConstants.VERTICAL_SPACING
);
         newLayout.horizontalSpacing = convertHorizontalDLUsToPixels( IDialogConstants.HORIZONTAL_SPACING
);
         newImageContainer.setLayout( newLayout );
-        newImageContainer.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
+        newImageContainer.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false )
);
 
         newImageLabel = createImageLabel( newImageContainer );
 
@@ -361,7 +361,7 @@ public class ImageDialog extends Dialog
 
         Composite newImageSelectContainer = createImageInfoContainer( newImageContainer );
         newImageFilenameText = new Text( newImageSelectContainer, SWT.SINGLE | SWT.BORDER
);
-        GridData gd = new GridData( GridData.GRAB_HORIZONTAL | GridData.HORIZONTAL_ALIGN_FILL
);
+        GridData gd = new GridData( SWT.FILL, SWT.CENTER, true, false );
         newImageFilenameText.setLayoutData( gd );
         newImageFilenameText.addModifyListener( new ModifyListener()
         {
@@ -624,9 +624,8 @@ public class ImageDialog extends Dialog
     private Label createImageLabel( Composite parent )
     {
         Composite labelComposite = new Composite( parent, SWT.BORDER );
-        GridLayout gl = new GridLayout( 1, true );
-        labelComposite.setLayout( gl );
-        GridData gd = new GridData( GridData.GRAB_HORIZONTAL | GridData.HORIZONTAL_ALIGN_FILL
);
+        labelComposite.setLayout( new GridLayout() );
+        GridData gd = new GridData( SWT.FILL, SWT.FILL, true, true );
         gd.widthHint = MAX_WIDTH;
         gd.heightHint = MAX_HEIGHT;
         labelComposite.setLayoutData( gd );



Mime
View raw message