Author: lluis
Date: 2006-04-03 13:38:38 -0400 (Mon, 03 Apr 2006)
New Revision: 58967
Added:
trunk/monodevelop/Core/src/MonoDevelop.Ide/icons/mono-powered.png
Modified:
trunk/monodevelop/Core/src/MonoDevelop.Ide/ChangeLog
trunk/monodevelop/Core/src/MonoDevelop.Ide/Makefile.am
trunk/monodevelop/Core/src/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/CommonAboutDialog.cs
trunk/monodevelop/Core/src/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/SharpDevelopAboutPanels.cs
trunk/monodevelop/Core/src/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/SplashScreen.cs
trunk/monodevelop/Core/src/MonoDevelop.Ide/icons/Icons.AboutImage
trunk/monodevelop/Core/src/MonoDevelop.Ide/icons/SplashScreen.png
Log:
2006-04-03 Lluis Sanchez Gual <[EMAIL PROTECTED]>
* MonoDevelop.Ide.Gui.Dialogs/SharpDevelopAboutPanels.cs:
Add some spacing and make the first column of the
assembly list rezisable.
* MonoDevelop.Ide.Gui.Dialogs/SplashScreen.cs: Embed the
progress bar into the bitmap.
* MonoDevelop.Ide.Gui.Dialogs/CommonAboutDialog.cs: Improved.
* Makefile.am: Added new bitmap.
* icons/Icons.AboutImage:
* icons/SplashScreen.png: Use the current logo for the about
box and splash window.
Modified: trunk/monodevelop/Core/src/MonoDevelop.Ide/ChangeLog
===================================================================
--- trunk/monodevelop/Core/src/MonoDevelop.Ide/ChangeLog 2006-04-03
17:35:05 UTC (rev 58966)
+++ trunk/monodevelop/Core/src/MonoDevelop.Ide/ChangeLog 2006-04-03
17:38:38 UTC (rev 58967)
@@ -1,3 +1,16 @@
+2006-04-03 Lluis Sanchez Gual <[EMAIL PROTECTED]>
+
+ * MonoDevelop.Ide.Gui.Dialogs/SharpDevelopAboutPanels.cs:
+ Add some spacing and make the first column of the
+ assembly list rezisable.
+ * MonoDevelop.Ide.Gui.Dialogs/SplashScreen.cs: Embed the
+ progress bar into the bitmap.
+ * MonoDevelop.Ide.Gui.Dialogs/CommonAboutDialog.cs: Improved.
+ * Makefile.am: Added new bitmap.
+ * icons/Icons.AboutImage:
+ * icons/SplashScreen.png: Use the current logo for the about
+ box and splash window.
+
2006-03-31 Lluis Sanchez Gual <[EMAIL PROTECTED]>
* MonoDevelop.Ide.addin.xml: Break compatibility
Modified: trunk/monodevelop/Core/src/MonoDevelop.Ide/Makefile.am
===================================================================
--- trunk/monodevelop/Core/src/MonoDevelop.Ide/Makefile.am 2006-04-03
17:35:05 UTC (rev 58966)
+++ trunk/monodevelop/Core/src/MonoDevelop.Ide/Makefile.am 2006-04-03
17:38:38 UTC (rev 58967)
@@ -248,6 +248,7 @@
templates/EmptyXMLFile.xft.xml \
Base.glade \
icons/SplashScreen.png \
+icons/mono-powered.png \
icons/Icons.AboutImage
GENERATED_FILES = \
Modified:
trunk/monodevelop/Core/src/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/CommonAboutDialog.cs
===================================================================
---
trunk/monodevelop/Core/src/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/CommonAboutDialog.cs
2006-04-03 17:35:05 UTC (rev 58966)
+++
trunk/monodevelop/Core/src/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/CommonAboutDialog.cs
2006-04-03 17:38:38 UTC (rev 58967)
@@ -23,8 +23,13 @@
internal class ScrollBox : DrawingArea
{
Pixbuf image;
- int scroll = -220;
+ Pixbuf monoPowered;
+ int scroll;
Pango.Layout layout;
+ int monoLogoSpacing = 30;
+ int textTop;
+ int scrollPause;
+ int scrollStart;
internal uint TimerHandle;
@@ -55,11 +60,12 @@
public ScrollBox ()
{
- this.SetSizeRequest (400, 220);
+ this.SetSizeRequest (450, 220);
this.Realized += new EventHandler (OnRealized);
this.ExposeEvent += new ExposeEventHandler (OnExposed);
image = new Gdk.Pixbuf (GetType().Assembly,
"Icons.AboutImage");
+ monoPowered = new Gdk.Pixbuf (GetType().Assembly,
"mono-powered.png");
TimerHandle = GLib.Timeout.Add (50, new TimeoutHandler
(ScrollDown));
}
@@ -87,8 +93,12 @@
bool ScrollDown ()
{
- ++scroll;
- this.QueueDrawArea (200, 0, 200, 220);
+ if (scrollPause > 0) {
+ if (--scrollPause == 0)
+ ++scroll;
+ } else
+ ++scroll;
+ this.QueueDrawArea (0, 0, 450, 220);
return true;
}
@@ -101,31 +111,47 @@
int GetTextHeight ()
{
- // FIXME: calculate this
- // nameCount * lineHeight
- return 325;
+ int w, h;
+ layout.GetPixelSize (out w, out h);
+ return h;
}
private void DrawText ()
{
- this.GdkWindow.DrawLayout (this.Style.TextGC
(StateType.Normal), 200, 0 - scroll, layout);
-
- if (scroll > GetTextHeight ())
- scroll = -scroll;
+ int maxHeight = GetTextHeight ();
+
+ this.GdkWindow.DrawLayout (this.Style.TextGC
(StateType.Normal), 0, textTop - scroll, layout);
+ this.GdkWindow.DrawPixbuf (this.Style.BackgroundGC
(StateType.Normal), monoPowered, 0, 0, (450/2) - (monoPowered.Width/2), textTop
- scroll + maxHeight + monoLogoSpacing, -1, -1, RgbDither.Normal, 0, 0);
+
+ if (scroll == maxHeight && scrollPause == 0)
+ scrollPause = 60;
+ if (scroll > maxHeight + monoLogoSpacing +
monoPowered.Height)
+ scroll = scrollStart;
}
protected void OnExposed (object o, ExposeEventArgs args)
{
+ int w, h;
+ this.GdkWindow.GetSize (out w, out h);
+ this.GdkWindow.DrawRectangle (this.Style.WhiteGC, true,
0, 0, w, h);
+ this.DrawText ();
this.DrawImage ();
- this.DrawText ();
+ this.GdkWindow.DrawRectangle (this.Style.WhiteGC, true,
0, 210, w, 10);
}
protected void OnRealized (object o, EventArgs args)
{
+ int x, y;
+ GdkWindow.GetOrigin (out x, out y);
+ textTop = y + image.Height - 30;
+ scrollStart = -(220 - textTop);
+ scroll = scrollStart;
+
layout = new Pango.Layout (this.PangoContext);
// FIXME: this seems wrong but works
- layout.Width = 253952;
+ layout.Width = 450 * (int)Pango.Scale.PangoScale;
layout.Wrap = Pango.WrapMode.Word;
+ layout.Alignment = Pango.Alignment.Center;
FontDescription fd = FontDescription.FromString
("Tahoma 10");
layout.FontDescription = fd;
layout.SetMarkup (CreditText);
@@ -139,6 +165,7 @@
public CommonAboutDialog ()
{
+ AllowGrow = false;
this.Title = GettextCatalog.GetString ("About
MonoDevelop");
this.TransientFor = IdeApp.Workbench.RootWindow;
aboutPictureScrollBox = new ScrollBox ();
@@ -146,7 +173,10 @@
this.VBox.PackStart (aboutPictureScrollBox, false,
false, 0);
Notebook nb = new Notebook ();
- nb.SetSizeRequest (400, 280);
+ nb.BorderWidth = 3;
+ nb.SetSizeRequest (440, 240);
+ this.ModifyBg (Gtk.StateType.Normal, new Gdk.Color
(255, 255, 255));
+ nb.ModifyBg (Gtk.StateType.Normal, new Gdk.Color (255,
255, 255));
VersionInformationTabPage vinfo = new
VersionInformationTabPage ();
nb.AppendPage (new AboutMonoDevelopTabPage (), new
Label (GettextCatalog.GetString ("About MonoDevelop")));
@@ -160,8 +190,7 @@
public new int Run ()
{
int tmp = base.Run ();
- // FIXME: remove?
- //GLib.Timeout.Remove (timerHandle);
+ GLib.Source.Remove (aboutPictureScrollBox.TimerHandle);
return tmp;
}
}
Modified:
trunk/monodevelop/Core/src/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/SharpDevelopAboutPanels.cs
===================================================================
---
trunk/monodevelop/Core/src/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/SharpDevelopAboutPanels.cs
2006-04-03 17:35:05 UTC (rev 58966)
+++
trunk/monodevelop/Core/src/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/SharpDevelopAboutPanels.cs
2006-04-03 17:38:38 UTC (rev 58967)
@@ -19,6 +19,7 @@
{
public AboutMonoDevelopTabPage ()
{
+ BorderWidth = 6;
Label versionLabel = new Label ();
Label licenseLabel = new Label ();
Label copyrightLabel = new Label ();
@@ -47,14 +48,19 @@
{
public VersionInformationTabPage ()
{
+ BorderWidth = 6;
TreeView listView = new TreeView ();
listView.RulesHint = true;
listView.AppendColumn (GettextCatalog.GetString
("Name"), new CellRendererText (), "text", 0);
listView.AppendColumn (GettextCatalog.GetString
("Version"), new CellRendererText (), "text", 1);
listView.AppendColumn (GettextCatalog.GetString
("Path"), new CellRendererText (), "text", 2);
+ listView.Columns [0].Sizing =
TreeViewColumnSizing.Fixed;
+ listView.Columns [0].FixedWidth = 200;
+ listView.Columns [0].Resizable = true;
listView.Model = FillListView ();
ScrolledWindow sw = new ScrolledWindow ();
+ sw.ShadowType = Gtk.ShadowType.In;
sw.Add (listView);
this.PackStart (sw, true, true, 0);
}
Modified:
trunk/monodevelop/Core/src/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/SplashScreen.cs
===================================================================
---
trunk/monodevelop/Core/src/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/SplashScreen.cs
2006-04-03 17:35:05 UTC (rev 58966)
+++
trunk/monodevelop/Core/src/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/SplashScreen.cs
2006-04-03 17:38:38 UTC (rev 58967)
@@ -15,6 +15,8 @@
static ProgressBar progress;
static VBox vbox;
ProgressTracker tracker = new ProgressTracker ();
+ Gdk.Pixbuf bitmap;
+ static Gtk.Label label;
public static SplashScreenForm SplashScreen {
get {
@@ -24,25 +26,34 @@
public SplashScreenForm () : base (Gtk.WindowType.Popup)
{
+ AppPaintable = true;
this.Decorated = false;
this.WindowPosition = WindowPosition.Center;
this.TypeHint = Gdk.WindowTypeHint.Splashscreen;
- Gdk.Pixbuf bitmap = new
Gdk.Pixbuf(Assembly.GetCallingAssembly(), "SplashScreen.png");
- Gtk.Image image = new Gtk.Image (bitmap);
- image.Show ();
+ bitmap = new Gdk.Pixbuf(Assembly.GetCallingAssembly(),
"SplashScreen.png");
- HBox hbox = new HBox();
progress = new ProgressBar();
progress.Fraction = 0.00;
- hbox.PackStart (progress, true, true, 5);
- hbox.ShowAll();
+ progress.HeightRequest = 6;
vbox = new VBox();
- vbox.PackStart(image, true, true, 0);
- vbox.PackStart(hbox, false, true, 5);
-
+ vbox.BorderWidth = 12;
+ label = new Gtk.Label ();
+ label.UseMarkup = true;
+ label.Xalign = 0;
+ vbox.PackEnd (progress, false, true, 0);
+ vbox.PackEnd (label, false, true, 3);
this.Add (vbox);
+
+ this.Resize (bitmap.Width, bitmap.Height);
}
+
+ protected override bool OnExposeEvent (Gdk.EventExpose evt)
+ {
+ Gdk.GC gc = Style.LightGC (StateType.Normal);
+ GdkWindow.DrawPixbuf (gc, bitmap, 0, 0, 0, 0,
bitmap.Width, bitmap.Height, Gdk.RgbDither.None, 0, 0);
+ return base.OnExposeEvent (evt);
+ }
public static void SetProgress (double Percentage)
{
@@ -52,7 +63,7 @@
public static void SetMessage (string Message)
{
- progress.Text = Message;
+ label.Markup = "<span size='small'
foreground='#707070'>" + Message + "</span>";
RunMainLoop ();
}
Modified: trunk/monodevelop/Core/src/MonoDevelop.Ide/icons/Icons.AboutImage
===================================================================
(Binary files differ)
Modified: trunk/monodevelop/Core/src/MonoDevelop.Ide/icons/SplashScreen.png
===================================================================
(Binary files differ)
Added: trunk/monodevelop/Core/src/MonoDevelop.Ide/icons/mono-powered.png
===================================================================
(Binary files differ)
Property changes on:
trunk/monodevelop/Core/src/MonoDevelop.Ide/icons/mono-powered.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches