Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

* QuickAccessToolbar.cs, Gallery.cs, Theme.cs, ApplicationMenuItem.cs,

  Ribbon.cs, RibbonGroup.cs, ApplicationMenu.cs, BaseButton.cs: Use
  the Default Theme instead of creating a new instance for each
  widget.

svn path=/trunk/gtk-sharp-ribbon/; revision=111596
  • Loading branch information...
commit fc43e5c4e4f1ecd49512994922c8d4d34e7ccbf8 1 parent b3473a9
Laurent Debacker authored
View
2  Ribbons/ApplicationMenu.cs
@@ -19,7 +19,7 @@ public class ApplicationMenu : Container
private const int borderWidth = 6;
private const int space = 2;
- protected Theme theme = new Theme ();
+ protected Theme theme = Theme.DefaultTheme;
private ApplicationButton appBtn;
private List<ApplicationMenuItem> items;
View
2  Ribbons/ApplicationMenuItem.cs
@@ -28,7 +28,7 @@ public class ApplicationMenuItem : Bin
private Label lbl;
private Widget menu;
- protected Theme theme = new Theme ();
+ protected Theme theme = Theme.DefaultTheme;
[GLib.Signal("action")]
public event EventHandler Action;
View
2  Ribbons/BaseButton.cs
@@ -7,7 +7,7 @@ namespace Ribbons
/// <summary>Foundation of all buttons.</summary>
public abstract class BaseButton : Bin
{
- protected Theme theme = new Theme ();
+ protected Theme theme = Theme.DefaultTheme;
protected GroupStyle groupStyle;
protected Theme.ButtonState state = Theme.ButtonState.Default;
protected PositionType imgPos;
View
6 Ribbons/ChangeLog
@@ -1,3 +1,9 @@
+2008-08-26 Laurent Debacker <debackerl@gmail.com>
+
+ * QuickAccessToolbar.cs, Gallery.cs, Theme.cs, ApplicationMenuItem.cs,
+ Ribbon.cs, RibbonGroup.cs, ApplicationMenu.cs, BaseButton.cs: Use the
+ Default Theme instead of creating a new instance for each widget.
+
2008-08-18 Laurent Debacker <debackerl@gmail.com>
* QuickAccessToolbar.cs, Ribbon.cs: Add support for key tips.
View
2  Ribbons/Gallery.cs
@@ -8,7 +8,7 @@ namespace Ribbons
/// <summary>Gallery of Tiles.</summary>
public class Gallery : Container
{
- protected Theme theme = new Theme ();
+ protected Theme theme = Theme.DefaultTheme;
private int tileWidth, tileHeight;
private List<Tile> tiles;
private Button up, down;
View
2  Ribbons/QuickAccessToolbar.cs
@@ -13,7 +13,7 @@ public class QuickAccessToolbar : Container
private List<Widget> widgets;
private List<KeyTip> keyTips;
private int[] widths;
- private Theme theme = new Theme ();
+ private Theme theme = Theme.DefaultTheme;
public QuickAccessToolbar()
{
View
2  Ribbons/Ribbon.cs
@@ -19,7 +19,7 @@ private enum KeyTipLevel { None, TopLevel, Tab };
private static double roundSize = 4.0;
protected ColorScheme colorScheme = new ColorScheme ();
- protected Theme theme = new Theme ();
+ protected Theme theme = Theme.DefaultTheme;
protected List<RibbonPage> pages;
protected int curPageIndex;
View
2  Ribbons/RibbonGroup.cs
@@ -7,7 +7,7 @@ namespace Ribbons
/// <summary>Ribbon group.</summary>
public class RibbonGroup : Bin
{
- protected Theme theme = new Theme ();
+ protected Theme theme = Theme.DefaultTheme;
protected string lbl;
protected Pango.Layout lbl_layout;
protected Button expandButton;
View
8 Ribbons/Theme.cs
@@ -7,6 +7,14 @@ namespace Ribbons
/// <remarks>Used to draw ribbon widgets.</remarks>
public class Theme
{
+ private static Theme defaultTheme = new Theme ();
+
+ public static Theme DefaultTheme
+ {
+ get { return defaultTheme; }
+ set { defaultTheme = value; }
+ }
+
public enum ButtonState
{
Default, Hover, Pressed
Please sign in to comment.
Something went wrong with that request. Please try again.