[jbosstools-commits] JBoss Tools SVN: r39544 - trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/skin/ios.

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Thu Mar 15 13:12:55 EDT 2012


Author: yradtsevich
Date: 2012-03-15 13:12:54 -0400 (Thu, 15 Mar 2012)
New Revision: 39544

Modified:
   trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/skin/ios/IOSPageTitleStyledText.java
Log:
https://issues.jboss.org/browse/JBIDE-11191 - BrowserSim Web Page Title - should change to the <title></title>
- OS X adaptation

Modified: trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/skin/ios/IOSPageTitleStyledText.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/skin/ios/IOSPageTitleStyledText.java	2012-03-15 15:57:54 UTC (rev 39543)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/skin/ios/IOSPageTitleStyledText.java	2012-03-15 17:12:54 UTC (rev 39544)
@@ -15,6 +15,7 @@
 import org.eclipse.swt.graphics.Color;
 import org.eclipse.swt.graphics.Device;
 import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.graphics.Image;
 import org.eclipse.swt.widgets.Composite;
 import org.jboss.tools.vpe.browsersim.ui.skin.ImageList;
 
@@ -22,32 +23,32 @@
 	private final String BD = "ios/";
 	private Font font;
 	private Color foregroundColor;
+	private static boolean IS_OSX = SWT.getPlatform() == "cocoa";
 	
 	public IOSPageTitleStyledText(Composite parent, ImageList imageList) {
-		super(parent, SWT.SINGLE | SWT.WRAP);
+		super(parent, (IS_OSX ? SWT.MULTI : SWT.SINGLE) | SWT.WRAP);
 		setBackgroundImage(imageList.getImage(BD + "page-title-background.png"));
 		setEditable(false);
 		setEnabled(false);
-		setMargins(16, 6, 16, 0);
+		setMargins(16, IS_OSX ? 7 : 6, 16, 0);
 		setAlignment(SWT.CENTER);
-		font = createFont(this.getDisplay(), 9, SWT.BOLD);
+		setLineSpacing(27);
+		font = createFont(this.getDisplay(), SWT.BOLD);
 		setFont(font);
 		foregroundColor = new Color(this.getDisplay(), 64, 64, 64);
 		setForeground(foregroundColor);
 	}
 	
-	static Font createFont(Device device, int FONT_SIZE, int style) {
+	static Font createFont(Device device, int style) {
 		Font font;
 		if(SWT.getPlatform() == "win32") {
-			font = new Font(device, "Arial", FONT_SIZE, style);	
-		} else if (SWT.getPlatform() == "motif") {
-			font = new Font(device, "Times", FONT_SIZE, style);		
+			font = new Font(device, "Arial", 9, style);	
 		} else if (SWT.getPlatform() == "gtk") {
-			font = new Font(device, "Baekmuk Batang", FONT_SIZE, style);		
+			font = new Font(device, "Baekmuk Batang", 9, style);		
 		} else if (SWT.getPlatform() == "cocoa") {
-			font = new Font(device, "Helvetica", FONT_SIZE, style);
-		} else { // photon
-			font = new Font(device, "Verdana", FONT_SIZE, style);
+			font = new Font(device, "Helvetica", 12, style);
+		} else {
+			font = new Font(device, "Verdana", 9, style);
 		}
 		
 		return font;



More information about the jbosstools-commits mailing list