diff options
author | Vsevolod Kukol <sevoku@microsoft.com> | 2021-03-13 03:39:11 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-13 03:39:11 +0300 |
commit | d89687fd4d3885b42f3aeca2e82e0c54dc4fb7d9 (patch) | |
tree | 157ab5a76ce98bba53db46d75a5012c297f8ad29 | |
parent | 204aa77d7527cc19b8a1ae6763ecd3404c7bd65c (diff) | |
parent | 93168d5290f6a04387c516db499a6bec4f4b4a70 (diff) |
Merge pull request #1050 from mono/dev/sevoku/fix-mac-scrollbars
Fix scroll bars on macOS
-rw-r--r-- | Xwt.XamMac/Xwt.Mac/ScrollControlBackend.cs | 2 | ||||
-rw-r--r-- | Xwt.XamMac/Xwt.Mac/ScrollViewBackend.cs | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/Xwt.XamMac/Xwt.Mac/ScrollControlBackend.cs b/Xwt.XamMac/Xwt.Mac/ScrollControlBackend.cs index aa72fb74..f5c415d3 100644 --- a/Xwt.XamMac/Xwt.Mac/ScrollControlBackend.cs +++ b/Xwt.XamMac/Xwt.Mac/ScrollControlBackend.cs @@ -98,7 +98,7 @@ namespace Xwt.Mac } public double UpperValue { - get { return vertical ? scrollView.ContentSize.Height : scrollView.ContentSize.Width; } + get { return vertical ? scrollView.ContentView.DocumentRect.Height : scrollView.ContentView.DocumentRect.Width; } } public double PageIncrement { diff --git a/Xwt.XamMac/Xwt.Mac/ScrollViewBackend.cs b/Xwt.XamMac/Xwt.Mac/ScrollViewBackend.cs index fe22ab55..58e0dbca 100644 --- a/Xwt.XamMac/Xwt.Mac/ScrollViewBackend.cs +++ b/Xwt.XamMac/Xwt.Mac/ScrollViewBackend.cs @@ -43,6 +43,7 @@ namespace Xwt.Mac ViewObject = new CustomScrollView (); Widget.HasHorizontalScroller = true; Widget.HasVerticalScroller = true; + Widget.AutohidesScrollers = true; Widget.AutoresizesSubviews = true; } |