Skip to content
This repository has been archived by the owner on Feb 8, 2018. It is now read-only.

Commit

Permalink
* QuickAccessToolbar.cs, Gallery.cs, Theme.cs, ApplicationMenuItem.cs,
Browse files Browse the repository at this point in the history
  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
Laurent Debacker committed Aug 26, 2008
1 parent b3473a9 commit fc43e5c
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Ribbons/ApplicationMenu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion Ribbons/ApplicationMenuItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion Ribbons/BaseButton.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 6 additions & 0 deletions Ribbons/ChangeLog
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion Ribbons/Gallery.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion Ribbons/QuickAccessToolbar.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
{
Expand Down
2 changes: 1 addition & 1 deletion Ribbons/Ribbon.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion Ribbons/RibbonGroup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
8 changes: 8 additions & 0 deletions Ribbons/Theme.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fc43e5c

Please sign in to comment.