diff options
| author | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2018-02-07 21:48:11 +0100 |
|---|---|---|
| committer | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2018-02-07 21:48:11 +0100 |
| commit | 829d1de43b5a9b39ace2f01eeecae5255f01ed1f (patch) | |
| tree | ca31b0f727b3c91adbab7a235bd1737ebc22a3ab /src/GraphicObjects/Scroller.cs | |
| parent | 2937dc695a03c6359494a0f1a9224766b6d1aa04 (diff) | |
shape widget
scrollbar improvments
debug:perform mousemove event if mouseup had active widget.
Diffstat (limited to 'src/GraphicObjects/Scroller.cs')
| -rw-r--r-- | src/GraphicObjects/Scroller.cs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/GraphicObjects/Scroller.cs b/src/GraphicObjects/Scroller.cs index 8dfed1eb..ec3bc47d 100644 --- a/src/GraphicObjects/Scroller.cs +++ b/src/GraphicObjects/Scroller.cs @@ -136,6 +136,15 @@ namespace Crow base.OnLayoutChanges (layoutType); NotifyValueChanged("MaximumScroll", MaximumScroll); + if (layoutType == LayoutingType.Height) { + NotifyValueChanged ("PageHeight", Slot.Height); + if (child?.Slot.Height > 0) + NotifyValueChanged ("ChildHeightRatio", Slot.Height * Slot.Height / child.Slot.Height); + } else { + NotifyValueChanged ("PageWidth", Slot.Width); + if (child?.Slot.Width > 0) + NotifyValueChanged ("ChildWidthRatio", Slot.Width * Slot.Width / child.Slot.Width); + } } void OnChildLayoutChanges (object sender, LayoutingEventArgs arg) { @@ -149,6 +158,8 @@ namespace Crow ScrollY = maxScroll; } NotifyValueChanged("MaximumScroll", maxScroll); + if (child?.Slot.Height > 0) + NotifyValueChanged ("ChildHeightRatio", Slot.Height * Slot.Height / child.Slot.Height); } } else if (arg.LayoutType == LayoutingType.Width) { if (maxScroll < ScrollX) { @@ -156,6 +167,8 @@ namespace Crow ScrollX = maxScroll; } NotifyValueChanged("MaximumScroll", maxScroll); + if (child?.Slot.Width > 0) + NotifyValueChanged ("ChildWidthRatio", Slot.Width * Slot.Width / child.Slot.Width); } } void onChildListCleared(object sender, EventArgs e){ |