THEME: change the layout of search filed
authorChangHyun Lee <leechwin.lee@samsung.com>
Wed, 22 Jun 2016 05:45:08 +0000 (14:45 +0900)
committerChangHyun Lee <leechwin.lee@samsung.com>
Wed, 22 Jun 2016 07:58:01 +0000 (16:58 +0900)
Change-Id: Ief8230e7a7c2424b3943839b86849674cbe23de8
Signed-off-by: ChangHyun Lee <leechwin.lee@samsung.com>
bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/quickaccess/SearchField.java

index eda2700..2f1ac15 100644 (file)
  *     Markus Kuppe <bugs.eclipse.org@lemmster.de> - Bug 449485: [QuickAccess] "Widget is disposed" exception in errorlog during shutdown due to quickaccess.SearchField.storeDialog
  *     Elena Laskavaia <elaskavaia.cdt@gmail.com> - Bug 433746: [QuickAccess] SWTException on closing quick access shell
  ******************************************************************************/
+/*
+ * 2016-06-22 leechwin.lee@samsung.com
+ * Modifications by S-Core Co., Ltd.
+ * 1. Give a Tizen identity
+ */
 package org.eclipse.ui.internal.quickaccess;
 import java.util.ArrayList;
 import java.util.HashMap;
@@ -53,7 +58,6 @@ import org.eclipse.swt.events.KeyAdapter;
 import org.eclipse.swt.events.KeyEvent;
 import org.eclipse.swt.events.ModifyEvent;
 import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.graphics.GC;
 import org.eclipse.swt.graphics.Point;
 import org.eclipse.swt.graphics.Rectangle;
 import org.eclipse.swt.layout.GridLayout;
@@ -286,13 +290,16 @@ public class SearchField {
                Text text = new Text(parent, SWT.SEARCH);
                text.setMessage(QuickAccessMessages.QuickAccess_EnterSearch);
 
-               GC gc = new GC(text);
-               Point p = gc.textExtent(QuickAccessMessages.QuickAccess_EnterSearch);
-               Rectangle r = text.computeTrim(0, 0, p.x, p.y);
-               gc.dispose();
+               /* Tizen */
+               // GC gc = new GC(text);
+               // Point p = gc.textExtent(QuickAccessMessages.QuickAccess_EnterSearch);
+               // Rectangle r = text.computeTrim(0, 0, p.x, p.y);
+               // gc.dispose();
 
                // computeTrim() may result in r.x < 0
-               GridDataFactory.fillDefaults().hint(r.width - r.x, SWT.DEFAULT).applyTo(text);
+               // GridDataFactory.fillDefaults().hint(r.width - r.x, SWT.DEFAULT).applyTo(text);
+               GridDataFactory.fillDefaults().hint(275, SWT.DEFAULT).applyTo(text);
+               /* ===== */
                return text;
        }