Remise du bouton charge style

Modif du style
This commit is contained in:
tzim 2015-04-09 13:23:33 +00:00
parent 7d0a3882d2
commit 1154c369ab
5 changed files with 146 additions and 46 deletions

View file

@ -806,5 +806,6 @@ namespace DMX2
mDlg= null; mDlg= null;
}; };
} }
} }
} }

View file

@ -28,6 +28,7 @@ namespace DMX2
private global::Gtk.Action connectAction1; private global::Gtk.Action connectAction1;
private global::Gtk.Action selectColorAction1; private global::Gtk.Action selectColorAction1;
private global::Gtk.Action seqSonAction; private global::Gtk.Action seqSonAction;
private global::Gtk.Action selectColorAction2;
private global::Gtk.VBox vbox1; private global::Gtk.VBox vbox1;
private global::Gtk.HBox hbox1; private global::Gtk.HBox hbox1;
private global::Gtk.VBox vbox2; private global::Gtk.VBox vbox2;
@ -57,7 +58,7 @@ namespace DMX2
private global::Gtk.EventBox evInfo; private global::Gtk.EventBox evInfo;
private global::Gtk.Label lblInfo; private global::Gtk.Label lblInfo;
private global::Gtk.Toolbar toolbar8; private global::Gtk.Toolbar toolbar8;
protected virtual void Build () protected virtual void Build ()
{ {
global::Stetic.Gui.Initialize (this); global::Stetic.Gui.Initialize (this);
@ -130,6 +131,8 @@ namespace DMX2
this.seqSonAction = new global::Gtk.Action ("seqSonAction", null, null, "gtk-cdrom"); this.seqSonAction = new global::Gtk.Action ("seqSonAction", null, null, "gtk-cdrom");
this.seqSonAction.Sensitive = false; this.seqSonAction.Sensitive = false;
w1.Add (this.seqSonAction, null); w1.Add (this.seqSonAction, null);
this.selectColorAction2 = new global::Gtk.Action ("selectColorAction2", null, null, "gtk-select-color");
w1.Add (this.selectColorAction2, null);
this.UIManager.InsertActionGroup (w1, 0); this.UIManager.InsertActionGroup (w1, 0);
this.AddAccelGroup (this.UIManager.AccelGroup); this.AddAccelGroup (this.UIManager.AccelGroup);
this.Name = "DMX2.MainWindow"; this.Name = "DMX2.MainWindow";
@ -459,7 +462,7 @@ namespace DMX2
global::Gtk.Box.BoxChild w77 = ((global::Gtk.Box.BoxChild)(this.hbox4 [this.evInfo])); global::Gtk.Box.BoxChild w77 = ((global::Gtk.Box.BoxChild)(this.hbox4 [this.evInfo]));
w77.Position = 1; w77.Position = 1;
// Container child hbox4.Gtk.Box+BoxChild // Container child hbox4.Gtk.Box+BoxChild
this.UIManager.AddUiFromString ("<ui><toolbar name='toolbar8'><toolitem name='newAction' action='newAction'/><toolitem name='openAction' action='openAction'/><toolitem name='saveAction' action='saveAction'/><toolitem name='saveAsAction' action='saveAsAction'/><toolitem name='closeAction' action='closeAction'/><toolitem name='aboutAction' action='aboutAction'/><toolitem name='quitAction' action='quitAction'/></toolbar></ui>"); this.UIManager.AddUiFromString ("<ui><toolbar name='toolbar8'><toolitem name='newAction' action='newAction'/><toolitem name='openAction' action='openAction'/><toolitem name='saveAction' action='saveAction'/><toolitem name='saveAsAction' action='saveAsAction'/><toolitem name='closeAction' action='closeAction'/><toolitem name='aboutAction' action='aboutAction'/><toolitem name='quitAction' action='quitAction'/><toolitem name='selectColorAction2' action='selectColorAction2'/></toolbar></ui>");
this.toolbar8 = ((global::Gtk.Toolbar)(this.UIManager.GetWidget ("/toolbar8"))); this.toolbar8 = ((global::Gtk.Toolbar)(this.UIManager.GetWidget ("/toolbar8")));
this.toolbar8.Name = "toolbar8"; this.toolbar8.Name = "toolbar8";
this.toolbar8.ShowArrow = false; this.toolbar8.ShowArrow = false;
@ -500,6 +503,7 @@ namespace DMX2
this.midiAction.Activated += new global::System.EventHandler (this.OnMidiActionActivated); this.midiAction.Activated += new global::System.EventHandler (this.OnMidiActionActivated);
this.selectColorAction1.Activated += new global::System.EventHandler (this.OnSelectColorActionActivated); this.selectColorAction1.Activated += new global::System.EventHandler (this.OnSelectColorActionActivated);
this.seqSonAction.Activated += new global::System.EventHandler (this.OnSeqSonActionActivated); this.seqSonAction.Activated += new global::System.EventHandler (this.OnSeqSonActionActivated);
this.selectColorAction2.Activated += new global::System.EventHandler (this.OnSelectColorActionActivated);
this.btnGo.Clicked += new global::System.EventHandler (this.OnBtnGoClicked); this.btnGo.Clicked += new global::System.EventHandler (this.OnBtnGoClicked);
this.btnGoBack.Clicked += new global::System.EventHandler (this.OnBtnGoBackClicked); this.btnGoBack.Clicked += new global::System.EventHandler (this.OnBtnGoBackClicked);
this.btnAjoutLigne.Clicked += new global::System.EventHandler (this.OnBtnAjoutLigneClicked); this.btnAjoutLigne.Clicked += new global::System.EventHandler (this.OnBtnAjoutLigneClicked);

View file

@ -5,7 +5,7 @@ namespace Stetic
internal class Gui internal class Gui
{ {
private static bool initialized; private static bool initialized;
internal static void Initialize (Gtk.Widget iconRenderer) internal static void Initialize (Gtk.Widget iconRenderer)
{ {
if ((Stetic.Gui.initialized == false)) { if ((Stetic.Gui.initialized == false)) {
@ -79,7 +79,7 @@ namespace Stetic
} }
} }
} }
internal class IconLoader internal class IconLoader
{ {
public static Gdk.Pixbuf LoadIcon (Gtk.Widget widget, string name, Gtk.IconSize size) public static Gdk.Pixbuf LoadIcon (Gtk.Widget widget, string name, Gtk.IconSize size)
@ -113,12 +113,12 @@ namespace Stetic
} }
} }
} }
internal class BinContainer internal class BinContainer
{ {
private Gtk.Widget child; private Gtk.Widget child;
private Gtk.UIManager uimanager; private Gtk.UIManager uimanager;
public static BinContainer Attach (Gtk.Bin bin) public static BinContainer Attach (Gtk.Bin bin)
{ {
BinContainer bc = new BinContainer (); BinContainer bc = new BinContainer ();
@ -127,32 +127,32 @@ namespace Stetic
bin.Added += new Gtk.AddedHandler (bc.OnAdded); bin.Added += new Gtk.AddedHandler (bc.OnAdded);
return bc; return bc;
} }
private void OnSizeRequested (object sender, Gtk.SizeRequestedArgs args) private void OnSizeRequested (object sender, Gtk.SizeRequestedArgs args)
{ {
if ((this.child != null)) { if ((this.child != null)) {
args.Requisition = this.child.SizeRequest (); args.Requisition = this.child.SizeRequest ();
} }
} }
private void OnSizeAllocated (object sender, Gtk.SizeAllocatedArgs args) private void OnSizeAllocated (object sender, Gtk.SizeAllocatedArgs args)
{ {
if ((this.child != null)) { if ((this.child != null)) {
this.child.Allocation = args.Allocation; this.child.Allocation = args.Allocation;
} }
} }
private void OnAdded (object sender, Gtk.AddedArgs args) private void OnAdded (object sender, Gtk.AddedArgs args)
{ {
this.child = args.Widget; this.child = args.Widget;
} }
public void SetUiManager (Gtk.UIManager uim) public void SetUiManager (Gtk.UIManager uim)
{ {
this.uimanager = uim; this.uimanager = uim;
this.child.Realized += new System.EventHandler (this.OnRealized); this.child.Realized += new System.EventHandler (this.OnRealized);
} }
private void OnRealized (object sender, System.EventArgs args) private void OnRealized (object sender, System.EventArgs args)
{ {
if ((this.uimanager != null)) { if ((this.uimanager != null)) {
@ -165,14 +165,14 @@ namespace Stetic
} }
} }
} }
internal class ActionGroups internal class ActionGroups
{ {
public static Gtk.ActionGroup GetActionGroup (System.Type type) public static Gtk.ActionGroup GetActionGroup (System.Type type)
{ {
return Stetic.ActionGroups.GetActionGroup (type.FullName); return Stetic.ActionGroups.GetActionGroup (type.FullName);
} }
public static Gtk.ActionGroup GetActionGroup (string name) public static Gtk.ActionGroup GetActionGroup (string name)
{ {
return null; return null;

View file

@ -228,6 +228,12 @@
<property name="StockId">gtk-cdrom</property> <property name="StockId">gtk-cdrom</property>
<signal name="Activated" handler="OnSeqSonActionActivated" /> <signal name="Activated" handler="OnSeqSonActionActivated" />
</action> </action>
<action id="selectColorAction2">
<property name="Type">Action</property>
<property name="Label" translatable="yes" />
<property name="StockId">gtk-select-color</property>
<signal name="Activated" handler="OnSelectColorActionActivated" />
</action>
</action-group> </action-group>
<property name="MemberName" /> <property name="MemberName" />
<property name="Title" translatable="yes">MainWindow</property> <property name="Title" translatable="yes">MainWindow</property>
@ -599,6 +605,7 @@ page</property>
<node type="Toolitem" action="closeAction" /> <node type="Toolitem" action="closeAction" />
<node type="Toolitem" action="aboutAction" /> <node type="Toolitem" action="aboutAction" />
<node type="Toolitem" action="quitAction" /> <node type="Toolitem" action="quitAction" />
<node type="Toolitem" action="selectColorAction2" />
</node> </node>
</widget> </widget>
<packing> <packing>

View file

@ -26,75 +26,87 @@ style "sombre"
bg[INSENSITIVE] = "#808080" bg[INSENSITIVE] = "#808080"
bg[PRELIGHT] = "#8080A0" bg[PRELIGHT] = "#8080A0"
base[NORMAL] = "#595959" base[NORMAL] = "#595959"
base[SELECTED] = "#bb5959" base[SELECTED] = "#B06060"
base[ACTIVE] = "#DAC000" base[ACTIVE] = "#A06060"
text[NORMAL] = "#D0D0D0" text[NORMAL] = "#D0D0D0"
fg[NORMAL] = "#FFFFFF" fg[NORMAL] = "#FFFFFF"
fg[PRELIGHT] = "#FFFFFF" fg[PRELIGHT] = "#FFFFFF"
engine "clearlooks" { engine "clearlooks" {
#colorize_scrollbar = FALSE colorize_scrollbar = TRUE
toolbarstyle = 0 reliefstyle = 1
menubarstyle = 2
toolbarstyle = 0
animation = FALSE
radius = 3.0
style = GUMMY
# Set a hint to disable backward compatibility fallbacks.
hint = "use-hints"
} }
GtkTreeView::odd-row-color = "#66666F" GtkTreeView::odd-row-color = "#66666F"
#GtkTreeView::even-row-color = "#595959" #GtkTreeView::even-row-color = "#595959"
} }
style "scale" { style "scale" = "sombre" {
GtkScale::slider-width = 19 GtkScale::slider-width = 19
GtkScale::slider-length = 27 GtkScale::slider-length = 27
GtkRange::trough-side-details = 1 GtkRange::trough-side-details = 1
bg[NORMAL] = "#A0A0B0" bg[NORMAL] = "#A0A0B0"
}
style "tirettes" {
font_name = "DejaVu Sans Mono 7"
GtkScale::slider-width = 19
GtkScale::slider-length = 28
bg[NORMAL] = "#A0A0B0"
bg[PRELIGHT] = "#8080A0" bg[PRELIGHT] = "#8080A0"
bg[SELECTED] = "#DAC000" bg[SELECTED] = "#C0B000"
fg[NORMAL] = "#FFFFFF" fg[NORMAL] = "#FFFFFF"
engine "clearlooks" {
hint="scale"
}
} }
style "tirettesc" { style "tirettes" = "scale" {
font_name = "DejaVu Sans Mono 7" font_name = "DejaVu Sans Mono 7"
GtkScale::slider-width = 19 engine "clearlooks" {
GtkScale::slider-length = 28 }
}
style "tirettesc" = "tirettes" {
bg[NORMAL] = "#B08080" bg[NORMAL] = "#B08080"
bg[PRELIGHT] = "#B06060"
bg[SELECTED] = "#DAC000"
fg[NORMAL] = "#FF5050" fg[NORMAL] = "#FF5050"
bg[PRELIGHT] = "#A08080"
engine "clearlooks" {
}
} }
style "tirettest" { style "tirettest" = "tirettes" {
font_name = "DejaVu Sans Mono 7"
GtkScale::slider-width = 19
GtkScale::slider-length = 28
bg[NORMAL] = "#80B080" bg[NORMAL] = "#80B080"
bg[PRELIGHT] = "#B06060"
bg[SELECTED] = "#DAC000"
fg[NORMAL] = "#50FF50" fg[NORMAL] = "#50FF50"
bg[PRELIGHT] = "#80A080"
engine "clearlooks" {
}
} }
style "tirettesm" { style "tirettesm" = "tirettes" {
font_name = "DejaVu Sans Mono 7"
GtkScale::slider-width = 19
GtkScale::slider-length = 28
bg[NORMAL] = "#6070B0" bg[NORMAL] = "#6070B0"
bg[PRELIGHT] = "#B06060"
bg[SELECTED] = "#DAC000"
fg[NORMAL] = "#8080FF" fg[NORMAL] = "#8080FF"
bg[PRELIGHT] = "#8080A0"
engine "clearlooks" {
}
} }
style "progressbar" { style "progressbar" {
bg[SELECTED] = "#A8A8B8" bg[SELECTED] = "#8080A0"
engine "clearlooks" {
hint="progressbar"
}
} }
style "circuitspb" style "circuitspb"
{ {
font_name = "DejaVu Sans 7" font_name = "DejaVu Sans 7"
bg[SELECTED] = "#DAC000" bg[SELECTED] = "#C0B000"
engine "clearlooks" {
hint="progressbar"
}
} }
style "counter" style "counter"
@ -102,6 +114,8 @@ style "counter"
fg[NORMAL] = "#FFFF00" fg[NORMAL] = "#FFFF00"
bg[NORMAL] = "#000000" bg[NORMAL] = "#000000"
font_name = "DejaVu Sans Mono Bold 12" font_name = "DejaVu Sans Mono Bold 12"
engine "clearlooks" {
}
} }
style "page" style "page"
@ -109,12 +123,16 @@ style "page"
fg[NORMAL] = "#FFFF00" fg[NORMAL] = "#FFFF00"
bg[NORMAL] = "#000000" bg[NORMAL] = "#000000"
font_name = "DejaVu Sans Mono Bold 32" font_name = "DejaVu Sans Mono Bold 32"
engine "clearlooks" {
}
} }
style "pagesmall" style "pagesmall"
{ {
fg[NORMAL] = "#FFFF00" fg[NORMAL] = "#FFFF00"
bg[NORMAL] = "#000000" bg[NORMAL] = "#000000"
font_name = "DejaVu Sans Mono Bold 6" font_name = "DejaVu Sans Mono Bold 6"
engine "clearlooks" {
}
} }
style "actmacro" style "actmacro"
@ -122,6 +140,8 @@ style "actmacro"
fg[NORMAL] = "#FFFF00" fg[NORMAL] = "#FFFF00"
bg[NORMAL] = "#000000" bg[NORMAL] = "#000000"
font_name = "DejaVu Sans Mono Bold 6" font_name = "DejaVu Sans Mono Bold 6"
engine "clearlooks" {
}
} }
@ -129,12 +149,80 @@ style "lbtirette"
{ {
fg[NORMAL] = "#D0D0D0" fg[NORMAL] = "#D0D0D0"
font_name = "DejaVu Sans 7" font_name = "DejaVu Sans 7"
engine "clearlooks" {
}
} }
style "entry" = "sombre" {
xthickness = 3
ythickness = 3
base[ACTIVE] = "#595959"
engine "clearlooks" {
}
}
style "treeview" {
engine "clearlooks" {
hint = "treeview"
}
}
style "treeview_header" = "sombre" {
xthickness = 2
ythickness = 1
engine "clearlooks" {
hint = "treeview-header"
}
}
style "tooltips" = "sombre" {
xthickness = 4
ythickness = 4
}
style "scrollbar" = "sombre" {
xthickness = 2
ythickness = 2
engine "clearlooks" {
hint = "scrollbar"
}
}
style "hscrollbar" = "sombre" {
engine "clearlooks" {
hint = "hscrollbar"
}
}
style "vscrollbar" = "sombre" {
engine "clearlooks" {
hint = "vscrollbar"
}
}
class "GtkWidget" style "sombre" class "GtkWidget" style "sombre"
class "GtkScale" style "scale" class "GtkScale" style "scale"
class "GtkProgressBar" style "progressbar" class "GtkProgressBar" style "progressbar"
class "GtkEntry" style "entry"
class "GtkScrollbar" style "scrollbar"
class "GtkHScrollbar" style "hscrollbar"
class "GtkVScrollbar" style "vscrollbar"
widget_class "*.<GtkTreeView>*" style "treeview"
widget_class "*.<GtkTreeView>.<GtkButton>" style "treeview_header"
widget_class "*.<GtkCTree>.<GtkButton>" style "treeview_header"
widget_class "*.<GtkList>.<GtkButton>" style "treeview_header"
widget_class "*.<GtkCList>.<GtkButton>" style "treeview_header"
widget "gtk-tooltip*" style "tooltips"
widget "*.pb" style "circuitspb" widget "*.pb" style "circuitspb"
widget "*.posLabel" style "counter" widget "*.posLabel" style "counter"
widget "*.timeLabel" style "counter" widget "*.timeLabel" style "counter"
@ -150,4 +238,4 @@ widget "*.lblTirette" style "lbtirette"
widget "*.sclTirette" style "tirettes" widget "*.sclTirette" style "tirettes"
widget "*.sclTiretteC" style "tirettesc" widget "*.sclTiretteC" style "tirettesc"
widget "*.sclTiretteT" style "tirettest" widget "*.sclTiretteT" style "tirettest"
widget "*.sclTiretteM" style "tirettesm" widget "*.sclTiretteM" style "tirettesm"