bouton 100% vs 255
This commit is contained in:
parent
eb7c20d395
commit
5c8728e9fb
5 changed files with 38 additions and 8 deletions
|
|
@ -249,7 +249,7 @@ namespace DMX2
|
||||||
{
|
{
|
||||||
VScale tirette = new VScale (null);
|
VScale tirette = new VScale (null);
|
||||||
tirette.WidthRequest = 25;
|
tirette.WidthRequest = 25;
|
||||||
tirette.HeightRequest = 125;
|
tirette.HeightRequest = 130;
|
||||||
tirette.CanFocus = true;
|
tirette.CanFocus = true;
|
||||||
tirette.Inverted = true;
|
tirette.Inverted = true;
|
||||||
tirette.Adjustment.Upper = 255;
|
tirette.Adjustment.Upper = 255;
|
||||||
|
|
@ -356,13 +356,17 @@ namespace DMX2
|
||||||
foreach (Circuit c in sequenceur.Circuits) {
|
foreach (Circuit c in sequenceur.Circuits) {
|
||||||
label = new Label();
|
label = new Label();
|
||||||
|
|
||||||
label.LabelProp = "00.0";
|
if(pourcentBtn.Active)
|
||||||
|
label.LabelProp = "00";
|
||||||
|
else
|
||||||
|
label.LabelProp = "00,0";
|
||||||
label.WidthRequest = 25;
|
label.WidthRequest = 25;
|
||||||
label.HeightRequest = 25;
|
label.HeightRequest = 25;
|
||||||
zoneWid.Add(label);
|
zoneWid.Add(label);
|
||||||
fx = ( zoneWid[label] as Fixed.FixedChild);
|
fx = ( zoneWid[label] as Fixed.FixedChild);
|
||||||
fx.X = xpos;
|
fx.X = xpos;
|
||||||
fx.Y = ypos;
|
fx.Y = ypos;
|
||||||
|
label.Name = "sclTirette";
|
||||||
label.Show();
|
label.Show();
|
||||||
label.Justify = Justification.Left;
|
label.Justify = Justification.Left;
|
||||||
|
|
||||||
|
|
@ -371,7 +375,7 @@ namespace DMX2
|
||||||
zoneWid.Add(tirette);
|
zoneWid.Add(tirette);
|
||||||
fx = ( zoneWid[tirette] as Fixed.FixedChild);
|
fx = ( zoneWid[tirette] as Fixed.FixedChild);
|
||||||
fx.X = xpos;
|
fx.X = xpos;
|
||||||
fx.Y = ypos + 25;
|
fx.Y = ypos + 20;
|
||||||
tirette.Show();
|
tirette.Show();
|
||||||
tirette.ValueChanged += TiretteActionee;
|
tirette.ValueChanged += TiretteActionee;
|
||||||
tirette.Data.Add(circuitKey,c);
|
tirette.Data.Add(circuitKey,c);
|
||||||
|
|
@ -408,7 +412,10 @@ namespace DMX2
|
||||||
{
|
{
|
||||||
VScale t = sender as VScale;
|
VScale t = sender as VScale;
|
||||||
Label lab = t.Data[labKey] as Label;
|
Label lab = t.Data[labKey] as Label;
|
||||||
lab.LabelProp = string.Format(@"{0:00.0}",100 * t.Value / 255 );
|
if(pourcentBtn.Active)
|
||||||
|
lab.LabelProp = string.Format(@"{0:00}", t.Value );
|
||||||
|
else
|
||||||
|
lab.LabelProp = string.Format(@"{0:00.0}",100 * t.Value / 255 );
|
||||||
if (updating) return;
|
if (updating) return;
|
||||||
Circuit c = t.Data[circuitKey] as Circuit;
|
Circuit c = t.Data[circuitKey] as Circuit;
|
||||||
sequenceur.ChangeValeur(c,(int)(t.Value));
|
sequenceur.ChangeValeur(c,(int)(t.Value));
|
||||||
|
|
@ -534,6 +541,12 @@ namespace DMX2
|
||||||
sequenceur.Master = (int)(seqMasterScale.Value);
|
sequenceur.Master = (int)(seqMasterScale.Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void OnPourcentBtnToggled (object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
fullUpdFlag = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@ namespace DMX2
|
||||||
this.Child.ShowAll ();
|
this.Child.ShowAll ();
|
||||||
}
|
}
|
||||||
this.DefaultWidth = 400;
|
this.DefaultWidth = 400;
|
||||||
this.DefaultHeight = 194;
|
this.DefaultHeight = 300;
|
||||||
this.Show ();
|
this.Show ();
|
||||||
this.buttonOk.Clicked += new global::System.EventHandler (this.OnButtonOkClicked);
|
this.buttonOk.Clicked += new global::System.EventHandler (this.OnButtonOkClicked);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,7 @@ namespace DMX2
|
||||||
private global::Gtk.Action moveDownAction;
|
private global::Gtk.Action moveDownAction;
|
||||||
private global::Gtk.Action circuitsAction;
|
private global::Gtk.Action circuitsAction;
|
||||||
private global::Gtk.Action closeAction;
|
private global::Gtk.Action closeAction;
|
||||||
|
private global::Gtk.ToggleAction pourcentBtn;
|
||||||
private global::Gtk.Frame frame1;
|
private global::Gtk.Frame frame1;
|
||||||
private global::Gtk.Alignment GtkAlignment;
|
private global::Gtk.Alignment GtkAlignment;
|
||||||
private global::Gtk.VBox vbox2;
|
private global::Gtk.VBox vbox2;
|
||||||
|
|
@ -69,6 +70,8 @@ namespace DMX2
|
||||||
w2.Add (this.circuitsAction, null);
|
w2.Add (this.circuitsAction, null);
|
||||||
this.closeAction = new global::Gtk.Action ("closeAction", null, null, "gtk-close");
|
this.closeAction = new global::Gtk.Action ("closeAction", null, null, "gtk-close");
|
||||||
w2.Add (this.closeAction, null);
|
w2.Add (this.closeAction, null);
|
||||||
|
this.pourcentBtn = new global::Gtk.ToggleAction ("pourcentBtn", null, null, "gtk-zoom-100");
|
||||||
|
w2.Add (this.pourcentBtn, null);
|
||||||
this.UIManager.InsertActionGroup (w2, 0);
|
this.UIManager.InsertActionGroup (w2, 0);
|
||||||
this.Name = "DMX2.SeqLinUI";
|
this.Name = "DMX2.SeqLinUI";
|
||||||
// Container child DMX2.SeqLinUI.Gtk.Container+ContainerChild
|
// Container child DMX2.SeqLinUI.Gtk.Container+ContainerChild
|
||||||
|
|
@ -208,7 +211,7 @@ namespace DMX2
|
||||||
global::Gtk.Box.BoxChild w14 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.GtkScrolledWindow]));
|
global::Gtk.Box.BoxChild w14 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.GtkScrolledWindow]));
|
||||||
w14.Position = 1;
|
w14.Position = 1;
|
||||||
// Container child hbox1.Gtk.Box+BoxChild
|
// Container child hbox1.Gtk.Box+BoxChild
|
||||||
this.UIManager.AddUiFromString ("<ui><toolbar name='toolbar3'><toolitem name='closeAction' action='closeAction'/><toolitem name='circuitsAction' action='circuitsAction'/><toolitem name='moveUpAction' action='moveUpAction'/><toolitem name='moveDownAction' action='moveDownAction'/></toolbar></ui>");
|
this.UIManager.AddUiFromString ("<ui><toolbar name='toolbar3'><toolitem name='closeAction' action='closeAction'/><toolitem name='circuitsAction' action='circuitsAction'/><toolitem name='moveUpAction' action='moveUpAction'/><toolitem name='moveDownAction' action='moveDownAction'/><toolitem name='pourcentBtn' action='pourcentBtn'/></toolbar></ui>");
|
||||||
this.toolbar3 = ((global::Gtk.Toolbar)(this.UIManager.GetWidget ("/toolbar3")));
|
this.toolbar3 = ((global::Gtk.Toolbar)(this.UIManager.GetWidget ("/toolbar3")));
|
||||||
this.toolbar3.Name = "toolbar3";
|
this.toolbar3.Name = "toolbar3";
|
||||||
this.toolbar3.Orientation = ((global::Gtk.Orientation)(1));
|
this.toolbar3.Orientation = ((global::Gtk.Orientation)(1));
|
||||||
|
|
@ -266,6 +269,7 @@ namespace DMX2
|
||||||
this.moveDownAction.Activated += new global::System.EventHandler (this.OnMoveDownActionActivated);
|
this.moveDownAction.Activated += new global::System.EventHandler (this.OnMoveDownActionActivated);
|
||||||
this.circuitsAction.Activated += new global::System.EventHandler (this.OnCircuitsActionActivated);
|
this.circuitsAction.Activated += new global::System.EventHandler (this.OnCircuitsActionActivated);
|
||||||
this.closeAction.Activated += new global::System.EventHandler (this.OnCloseActionActivated);
|
this.closeAction.Activated += new global::System.EventHandler (this.OnCloseActionActivated);
|
||||||
|
this.pourcentBtn.Toggled += new global::System.EventHandler (this.OnPourcentBtnToggled);
|
||||||
this.seqMasterScale.ValueChanged += new global::System.EventHandler (this.OnSeqMasterScaleValueChanged);
|
this.seqMasterScale.ValueChanged += new global::System.EventHandler (this.OnSeqMasterScaleValueChanged);
|
||||||
this.zoneWid.SizeAllocated += new global::Gtk.SizeAllocatedHandler (this.OnZoneWidSizeAllocated);
|
this.zoneWid.SizeAllocated += new global::Gtk.SizeAllocatedHandler (this.OnZoneWidSizeAllocated);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
<target-gtk-version>2.12</target-gtk-version>
|
<target-gtk-version>2.12</target-gtk-version>
|
||||||
</configuration>
|
</configuration>
|
||||||
<import>
|
<import>
|
||||||
<widget-library name="../bin/Debug/DMX-2.0.exe" internal="true" />
|
<widget-library name="../bin/Release/DMX-2.0.exe" internal="true" />
|
||||||
</import>
|
</import>
|
||||||
<icon-factory>
|
<icon-factory>
|
||||||
<icon-set id="tirettes">
|
<icon-set id="tirettes">
|
||||||
|
|
@ -751,6 +751,14 @@ au sequenceur</property>
|
||||||
<property name="StockId">gtk-close</property>
|
<property name="StockId">gtk-close</property>
|
||||||
<signal name="Activated" handler="OnCloseActionActivated" />
|
<signal name="Activated" handler="OnCloseActionActivated" />
|
||||||
</action>
|
</action>
|
||||||
|
<action id="pourcentBtn">
|
||||||
|
<property name="Type">Toggle</property>
|
||||||
|
<property name="Label" translatable="yes" />
|
||||||
|
<property name="StockId">gtk-zoom-100</property>
|
||||||
|
<property name="DrawAsRadio">False</property>
|
||||||
|
<property name="Active">False</property>
|
||||||
|
<signal name="Toggled" handler="OnPourcentBtnToggled" />
|
||||||
|
</action>
|
||||||
</action-group>
|
</action-group>
|
||||||
<property name="MemberName" />
|
<property name="MemberName" />
|
||||||
<child>
|
<child>
|
||||||
|
|
@ -947,6 +955,7 @@ au sequenceur</property>
|
||||||
<node type="Toolitem" action="circuitsAction" />
|
<node type="Toolitem" action="circuitsAction" />
|
||||||
<node type="Toolitem" action="moveUpAction" />
|
<node type="Toolitem" action="moveUpAction" />
|
||||||
<node type="Toolitem" action="moveDownAction" />
|
<node type="Toolitem" action="moveDownAction" />
|
||||||
|
<node type="Toolitem" action="pourcentBtn" />
|
||||||
</node>
|
</node>
|
||||||
</widget>
|
</widget>
|
||||||
<packing>
|
<packing>
|
||||||
|
|
@ -2565,7 +2574,7 @@ au sequenceur</property>
|
||||||
</widget>
|
</widget>
|
||||||
</child>
|
</child>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="Gtk.Dialog" id="DMX2.About" design-size="400 194">
|
<widget class="Gtk.Dialog" id="DMX2.About" design-size="400 300">
|
||||||
<property name="MemberName" />
|
<property name="MemberName" />
|
||||||
<property name="WindowPosition">CenterOnParent</property>
|
<property name="WindowPosition">CenterOnParent</property>
|
||||||
<property name="Modal">True</property>
|
<property name="Modal">True</property>
|
||||||
|
|
|
||||||
|
|
@ -48,6 +48,7 @@ style "scale" {
|
||||||
}
|
}
|
||||||
|
|
||||||
style "tirettes" {
|
style "tirettes" {
|
||||||
|
font_name = "DejaVu Sans Mono 7"
|
||||||
GtkScale::slider-width = 19
|
GtkScale::slider-width = 19
|
||||||
GtkScale::slider-length = 28
|
GtkScale::slider-length = 28
|
||||||
bg[NORMAL] = "#A0A0B0"
|
bg[NORMAL] = "#A0A0B0"
|
||||||
|
|
@ -57,6 +58,7 @@ style "tirettes" {
|
||||||
}
|
}
|
||||||
|
|
||||||
style "tirettesc" {
|
style "tirettesc" {
|
||||||
|
font_name = "DejaVu Sans Mono 7"
|
||||||
GtkScale::slider-width = 19
|
GtkScale::slider-width = 19
|
||||||
GtkScale::slider-length = 28
|
GtkScale::slider-length = 28
|
||||||
bg[NORMAL] = "#B08080"
|
bg[NORMAL] = "#B08080"
|
||||||
|
|
@ -66,6 +68,7 @@ style "tirettesc" {
|
||||||
}
|
}
|
||||||
|
|
||||||
style "tirettest" {
|
style "tirettest" {
|
||||||
|
font_name = "DejaVu Sans Mono 7"
|
||||||
GtkScale::slider-width = 19
|
GtkScale::slider-width = 19
|
||||||
GtkScale::slider-length = 28
|
GtkScale::slider-length = 28
|
||||||
bg[NORMAL] = "#80B080"
|
bg[NORMAL] = "#80B080"
|
||||||
|
|
@ -75,6 +78,7 @@ style "tirettest" {
|
||||||
}
|
}
|
||||||
|
|
||||||
style "tirettesm" {
|
style "tirettesm" {
|
||||||
|
font_name = "DejaVu Sans Mono 7"
|
||||||
GtkScale::slider-width = 19
|
GtkScale::slider-width = 19
|
||||||
GtkScale::slider-length = 28
|
GtkScale::slider-length = 28
|
||||||
bg[NORMAL] = "#6070B0"
|
bg[NORMAL] = "#6070B0"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue