From e88d93bb746939132335a0ccfb4f51517fad33ea Mon Sep 17 00:00:00 2001 From: Ian Harrigan Date: Fri, 15 Mar 2024 07:56:30 +0100 Subject: [PATCH] remove isScroller property in favour of "is IScroller" --- haxe/ui/backend/ComponentBase.hx | 5 ----- haxe/ui/components/NumberStepper.hx | 3 ++- haxe/ui/components/OptionStepper.hx | 3 ++- haxe/ui/containers/ScrollView.hx | 4 ---- 4 files changed, 4 insertions(+), 11 deletions(-) diff --git a/haxe/ui/backend/ComponentBase.hx b/haxe/ui/backend/ComponentBase.hx index 7c5569982..c1291ba24 100644 --- a/haxe/ui/backend/ComponentBase.hx +++ b/haxe/ui/backend/ComponentBase.hx @@ -1682,11 +1682,6 @@ class ComponentBase extends ComponentSurface implements IClonable return false; } - private var isScroller(get, null):Bool; - private function get_isScroller():Bool { - return false; - } - private function handleFrameworkProperty(id:String, value:Any) { } diff --git a/haxe/ui/components/NumberStepper.hx b/haxe/ui/components/NumberStepper.hx index 8a28b9035..bfd0a3cd1 100644 --- a/haxe/ui/components/NumberStepper.hx +++ b/haxe/ui/components/NumberStepper.hx @@ -9,6 +9,7 @@ import haxe.ui.core.Component; import haxe.ui.core.CompositeBuilder; import haxe.ui.core.ICompositeInteractiveComponent; import haxe.ui.core.InteractiveComponent; +import haxe.ui.core.IScroller; import haxe.ui.events.ActionEvent; import haxe.ui.events.FocusEvent; import haxe.ui.events.MouseEvent; @@ -305,7 +306,7 @@ private class Events extends haxe.ui.events.Events { private function isInScroller():Bool { var p = _stepper.parentComponent; while (p != null) { - if (p.isScroller) { + if ((p is IScroller)) { var vscroll = p.findComponent("scrollview-vscroll", Component); if (vscroll != null && vscroll.hidden == false) { return true; diff --git a/haxe/ui/components/OptionStepper.hx b/haxe/ui/components/OptionStepper.hx index 2ef1af668..77dfb4044 100644 --- a/haxe/ui/components/OptionStepper.hx +++ b/haxe/ui/components/OptionStepper.hx @@ -10,6 +10,7 @@ import haxe.ui.core.CompositeBuilder; import haxe.ui.core.ICompositeInteractiveComponent; import haxe.ui.core.IDataComponent; import haxe.ui.core.InteractiveComponent; +import haxe.ui.core.IScroller; import haxe.ui.data.DataSource; import haxe.ui.events.ActionEvent; import haxe.ui.events.FocusEvent; @@ -307,7 +308,7 @@ private class Events extends haxe.ui.events.Events { private function isInScroller():Bool { var p = _stepper.parentComponent; while (p != null) { - if (p.isScroller) { + if ((p is IScroller)) { var vscroll = p.findComponent("scrollview-vscroll", Component); if (vscroll != null && vscroll.hidden == false) { return true; diff --git a/haxe/ui/containers/ScrollView.hx b/haxe/ui/containers/ScrollView.hx index bc6c9d229..54f796d3e 100644 --- a/haxe/ui/containers/ScrollView.hx +++ b/haxe/ui/containers/ScrollView.hx @@ -79,10 +79,6 @@ class ScrollView extends InteractiveComponent implements IScroller { cast(_compositeBuilder, ScrollViewBuilder).updateScrollRect(); // TODO: or this } } - - private override function get_isScroller():Bool { - return true; - } } //***********************************************************************************************************