Return-Path: X-Original-To: apmail-directory-commits-archive@www.apache.org Delivered-To: apmail-directory-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id AA4E37DFA for ; Thu, 3 Nov 2011 17:48:52 +0000 (UTC) Received: (qmail 6369 invoked by uid 500); 3 Nov 2011 17:48:52 -0000 Delivered-To: apmail-directory-commits-archive@directory.apache.org Received: (qmail 6327 invoked by uid 500); 3 Nov 2011 17:48:52 -0000 Mailing-List: contact commits-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@directory.apache.org Delivered-To: mailing list commits@directory.apache.org Received: (qmail 6320 invoked by uid 99); 3 Nov 2011 17:48:52 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Nov 2011 17:48:52 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Nov 2011 17:48:49 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id AE475238897A for ; Thu, 3 Nov 2011 17:48:28 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@directory.apache.org From: pamarcelot@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20111103174828.AE475238897A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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 );