Bug 11071 - SplashScreen no label displays messages
Summary: SplashScreen no label displays messages
Status: RESOLVED NOT_ON_ROADMAP
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: General ()
Version: Trunk
Hardware: All Linux
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2013-03-12 10:10 UTC by harold_reina75
Modified: 2013-03-12 21:03 UTC (History)
1 user (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED NOT_ON_ROADMAP

Description harold_reina75 2013-03-12 10:10:26 UTC
SplashScreen.cs no label displays messages

the problem happens to overwrite the method OnExposeEvent

possible solution:

@@ -19,7 +19,7 @@
 		static VBox vbox;
 		ProgressTracker tracker = new ProgressTracker ();
 		Gdk.Pixbuf bitmap;
-		static Gtk.Label label;
+		static Gtk.Label label, labelVersion;
 		bool showVersionInfo;
 		
 		public static SplashScreenForm SplashScreen {
@@ -41,6 +41,11 @@
 			try {
 				using (var stream = BrandingService.GetStream ("SplashScreen.png", true))
 					bitmap = new Gdk.Pixbuf (stream);
+				this.Resize (bitmap.Width, bitmap.Height);
+				Gdk.Pixmap pixmap, pixmap_mask;
+				this.Show ();
+				bitmap.RenderPixmapAndMask ( out pixmap, out pixmap_mask, 255);
+				base.GdkWindow.SetBackPixmap (pixmap, false);
 			} catch (Exception e) {
 				LoggingService.LogError ("Can't load splash screen pixbuf 'SplashScreen.png'.", e);
 			}
@@ -53,11 +58,26 @@
 			label = new Gtk.Label ();
 			label.UseMarkup = true;
 			label.Xalign = 0;
+
+			labelVersion = new Gtk.Label ();
+			labelVersion.UseMarkup = true;
+			labelVersion.Xalign = 1;
+
 			vbox.PackEnd (progress, false, true, 0);
 			vbox.PackEnd (label, false, true, 3);
+			vbox.PackEnd (labelVersion, false, true, 0);
 			this.Add (vbox);
-			if (bitmap != null)
-				this.Resize (bitmap.Width, bitmap.Height);
+//			if (bitmap != null)
+//				this.Resize (bitmap.Width, bitmap.Height);
+			var build = "";
+			var version = "v" + BuildVariables.PackageVersionLabel;
+			var index = version.IndexOf (' ');
+			if (index != -1) {
+				build = version.Substring (index + 1);
+				version = version.Substring (0, index);
+			}
+			if (showVersionInfo)
+				labelVersion.Markup = "<span>" + version +"</span>";
 		}
 		
 		protected override void OnDestroyed ()
@@ -69,40 +89,40 @@
 			}
 		}
 		
-		protected override bool OnExposeEvent (Gdk.EventExpose evt)
-		{
-			var build = "";
-			var version = "v" + BuildVariables.PackageVersionLabel;
-			
-			var index = version.IndexOf (' ');
-			if (index != -1) {
-				build = version.Substring (index + 1);
-				version = version.Substring (0, index);
-			}
-			
-			if (bitmap != null) {
-				using (var context = Gdk.CairoHelper.Create (GdkWindow)) {
-					context.Antialias = Cairo.Antialias.Subpixel;
-				
-					// Render the image first.
-					bitmap.RenderToDrawable (GdkWindow, new Gdk.GC (GdkWindow), 0, 0, 0, 0, bitmap.Width, bitmap.Height, Gdk.RgbDither.None, 0, 0);
-					
-					if (showVersionInfo) {
-						var bottomRight = new Cairo.PointD (bitmap.Width - 12, bitmap.Height - 25);
-						// Render the alpha/beta text if we're an alpha or beta. If this
-						// is rendered, the bottomRight point will be shifted upwards to
-						// allow the MonoDevelop version to be rendered above the alpha marker
-						if (!string.IsNullOrEmpty (build)) {
-							DrawAlphaBetaMarker (context, ref bottomRight, build);
-						}
-						// Render the MonoDevelop version
-						DrawVersionNumber (context, ref bottomRight, version);
-					}
-				}
-			}
-
-			return true;
-		}
+//		protected override bool OnExposeEvent (Gdk.EventExpose evt)
+//		{
+//			var build = "";
+//			var version = "v" + BuildVariables.PackageVersionLabel;
+//			
+//			var index = version.IndexOf (' ');
+//			if (index != -1) {
+//				build = version.Substring (index + 1);
+//				version = version.Substring (0, index);
+//			}
+//			
+//			if (bitmap != null) {
+//				using (var context = Gdk.CairoHelper.Create (GdkWindow)) {
+//					context.Antialias = Cairo.Antialias.Subpixel;
+//				
+//					// Render the image first.
+//					bitmap.RenderToDrawable (GdkWindow, new Gdk.GC (GdkWindow), 0, 0, 0, 0, bitmap.Width, bitmap.Height, Gdk.RgbDither.None, 0, 0);
+//					
+//					if (showVersionInfo) {
+//						var bottomRight = new Cairo.PointD (bitmap.Width - 12, bitmap.Height - 25);
+//						// Render the alpha/beta text if we're an alpha or beta. If this
+//						// is rendered, the bottomRight point will be shifted upwards to
+//						// allow the MonoDevelop version to be rendered above the alpha marker
+//						if (!string.IsNullOrEmpty (build)) {
+//							DrawAlphaBetaMarker (context, ref bottomRight, build);
+//						}
+//						// Render the MonoDevelop version
+//						DrawVersionNumber (context, ref bottomRight, version);
+//					}
+//				}
+//			}
+//
+//			return true;
+//		}
 		
 		void DrawVersionNumber (Cairo.Context c, ref Cairo.PointD bottomRight, string text)
 		{
Comment 1 harold_reina75 2013-03-12 10:26:09 UTC
Same problem (Debian Whezzt)
mono (trunk)
monodevelop (trunk)

Same problem (Windows 7)
monodevelop (Xamarin Studio 4.1)
Comment 2 Mikayla Hutchinson [MSFT] 2013-03-12 21:03:14 UTC
This is an intentional design decision to display only the splash image.

I cleaned it up to remove the dead code.