set
{
if (!_canPop & value)
- return;
-
+ return;
+
if (value == _isPopped)
return;
if (r.Right - Content.Slot.Width < tc.ClientRectangle.Left)
Content.Left = r.Right;
else
- Content.Left = r.Right - Content.Slot.Width;
+ Content.Left = r.Right - Content.Slot.Width;
}
} else {
if (Content.Slot.Width < tc.ClientRectangle.Width) {
base.onMouseLeave (this, e);
}
public override bool MouseIsIn (Point m)
- {
+ {
if (Content?.Parent != null)
if (Content.MouseIsIn (m))
return true;
public virtual void onPop(object sender, EventArgs e)
{
- if (Content != null) {
+ if (Content != null) {
if (Content.Parent == null)
IFace.AddWidget (Content);
Content.IsVisible = true;
public virtual void onUnpop(object sender, EventArgs e)
{
if (Content != null)
- Content.IsVisible = false;
+ Content.IsVisible = false;
Unpoped.Raise (this, e);
ToggleOff.Raise (this, null);
}
IsPopped = value;
}
}
- #endregion
+ #endregion
}
}
Group g = child as Group;
if (g != null)
g.ChildrenCleared -= onChildListCleared;
-
+
base.SetChild (_child);
g = _child as Group;
if (g != null)
- g.ChildrenCleared += onChildListCleared;
+ g.ChildrenCleared += onChildListCleared;
}
public override void OnChildLayoutChanges (object sender, LayoutingEventArgs arg)
{
Background.SetAsSource (IFace, gr, rBack);
CairoHelpers.CairoRectangle(gr,rBack, CornerRadius);
gr.Fill ();
-
+
gr.Save ();
if (ClipToClientRect) {
if (child != null)
child.Paint (gr);
-
+
//gr.Translate (ScrollX, ScrollY);
gr.Restore ();
/// <summary> Process scrolling vertically, or if shift is down, vertically </summary>
public override void onMouseWheel (object sender, MouseWheelEventArgs e)
{
- if (IFace.Shift)
+ if (IFace.Shift || maxScrollY == 0)
ScrollX += e.Delta * ScrollSpeed;
else
ScrollY -= e.Delta * ScrollSpeed;
if (lt == LayoutingType.Height) {
MaxScrollY = child.Slot.Height - cb.Height;
if (child.Slot.Height > 0)
- NotifyValueChanged ("ChildHeightRatio", (double)Slot.Height / child.Slot.Height);
+ NotifyValueChanged ("ChildHeightRatio", (double)Slot.Height / child.Slot.Height);
} else if (lt == LayoutingType.Width) {
MaxScrollX = child.Slot.Width - cb.Width;
if (child.Slot.Width > 0)