From af3c7884d47f6a32beb81a52d7f98159a1a99324 Mon Sep 17 00:00:00 2001 From: Martin Dias Date: Mon, 23 Sep 2024 22:27:59 -0300 Subject: [PATCH] Move system settings to Bloc-Infinite package Fixes #599 --- .../BlInfiniteMouseScrollListener.class.st | 15 +++++++++++++++ src/Bloc/Bloc.class.st | 9 +-------- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/src/Bloc-Infinite/BlInfiniteMouseScrollListener.class.st b/src/Bloc-Infinite/BlInfiniteMouseScrollListener.class.st index 0dbcd421b..ee801693b 100644 --- a/src/Bloc-Infinite/BlInfiniteMouseScrollListener.class.st +++ b/src/Bloc-Infinite/BlInfiniteMouseScrollListener.class.st @@ -22,6 +22,21 @@ BlInfiniteMouseScrollListener class >> scrollingVelocity: anInteger [ ScrollingVelocity := anInteger ] +{ #category : #settings } +BlInfiniteMouseScrollListener class >> settingsOn: aBuilder [ + + + (aBuilder range: #scrollingVelocity) + parent: Bloc groupSymbolForBloc; + target: self; + order: 5; + label: 'Scrolling velocity'; + description: + 'A positive integer used as a multiplier to increase mousewheel scrolling velocity '; + range: (1 to: 200 by: 1); + default: OSPlatform current defaultScrollingVelocity +] + { #category : #'mouse handlers' } BlInfiniteMouseScrollListener >> canScrollDown: anInfiniteElement [ "Return true if an infinite element can be scrolled down" diff --git a/src/Bloc/Bloc.class.st b/src/Bloc/Bloc.class.st index ba5316827..1b784921e 100644 --- a/src/Bloc/Bloc.class.st +++ b/src/Bloc/Bloc.class.st @@ -89,6 +89,7 @@ Bloc class >> preferableChildrenDataStructure: anChildrenCollectionClass [ { #category : #settings } Bloc class >> preferencesOn: aBuilder [ + (aBuilder group: self groupSymbolForBloc) label: 'Bloc'; description: 'Bloc settings'; @@ -101,14 +102,6 @@ Bloc class >> preferencesOn: aBuilder [ domainValues: { BlChildrenArray . BlChildrenRope . BlChildrenLinkedList }; description: 'Choose which data structure should be used to store element''s children'. - (aBuilder range: #scrollingVelocity) - order: 5; - target: BlInfiniteMouseScrollListener; - label: 'Scrolling velocity'; - description: 'A positive integer used as a multiplier to increase mousewheel scrolling velocity '; - range: (1 to: 200 by: 1); - default: OSPlatform current defaultScrollingVelocity. - (aBuilder setting: #assertionsEnabled) order: 6; target: self;