void OpenGLDraw()
{
GL.GetInteger (GetPName.Viewport, viewport);
- GL.Viewport (0, 0, ClientRectangle.Width, ClientRectangle.Height);
+ bool blend = GL.GetBoolean (GetPName.Blend);
+ GL.Enable (EnableCap.Blend);
+ GL.Viewport (0, 0, ClientRectangle.Width, ClientRectangle.Height);
+ GL.DepthMask (false);
+ GL.Disable (EnableCap.DepthTest);
shader.Enable ();
lock (CrowInterface.RenderMutex) {
if (CrowInterface.IsDirty) {
GL.BindTexture(TextureTarget.Texture2D, 0);
shader.Disable ();
+ if (!blend)
+ GL.Disable (EnableCap.Blend);
GL.Viewport (viewport [0], viewport [1], viewport [2], viewport [3]);
+
+ GL.DepthMask (true);
+ GL.Enable (EnableCap.DepthTest);
}
#endregion
<Border Background="{../Background}" MinimumSize="50;20" Height="{../HeightPolicy}" Width="{../WidthPolicy}"
Foreground="Transparent" CornerRadius="{../CornerRadius}" BorderWidth="1"
MouseEnter="{Foreground=vgradient|0:White|0,2:Gray|0,9:Gray|1:Black;caption.Foreground=White}"
- MouseLeave="{Foreground=Transparent;caption.Foreground=DimGray}"
+ MouseLeave="{Foreground=Transparent;caption.Foreground=LightGray}"
MouseDown="{Foreground=vgradient|0:Black|0,05:Gray|0,85:Gray|1:White}"
MouseUp="{Foreground=vgradient|0:White|0,2:Gray|0,9:Gray|1:Black}"
>
<!-- <Image Height="0" Width="0" Margin="0" Path="{../../Image}" SvgSub="{../../SvgSub}"/>-->
- <Label Font="{../../Font}" Name="caption" Margin="5" Foreground="DimGray" Text="{../../Caption}"/>
+ <Label Font="{../../Font}" Name="caption" Margin="5" Foreground="LightGray" Text="{../../Caption}"/>
</Border>
\ No newline at end of file
}
set
{
- if (_text == value)
+ if (string.Equals (value, _text, StringComparison.Ordinal))
return;
_text = value;
Container _contentContainer;
Direction currentDirection = Direction.None;
+ public event EventHandler Closing;
+
#region CTOR
public Window () : base() {
}
#endregion
- #region GraphicObject overrides
- [XmlAttributeAttribute()][DefaultValue(true)]//overiden to get default to true
- public override bool Focusable
- {
- get { return base.Focusable; }
- set { base.Focusable = value; }
- }
- #endregion
-
public override GraphicObject Content {
get {
return _contentContainer == null ? null : _contentContainer.Child;
protected void butQuitPress (object sender, MouseButtonEventArgs e)
{
- ILayoutable parent = (sender as GraphicObject).Parent;
- while(!(parent is Window))
- parent = parent.Parent;
- Interface.CurrentInterface.DeleteWidget (parent as GraphicObject);
+ close ();
+ }
+
+ void close(){
+ Closing.Raise (this, null);
+
+ Interface.CurrentInterface.DeleteWidget (this);
}
public override void ResolveBindings ()
lock (UpdateMutex) {
GraphicObject tmp = Interface.Load (path, this);
AddWidget (tmp);
+
return tmp;
}
}
{
g.Parent = this;
GraphicObjects.Insert (0, g);
-
g.RegisterForLayouting (LayoutingType.Sizing);
}
public void DeleteWidget(GraphicObject g)