MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / scrollSettings

Function scrollSettings

src/settings/scrollSettings.js:5–86  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3import appSettings from "lib/settings";
4
5export default function scrollSettings() {
6 const values = appSettings.value;
7 const title = strings["scroll settings"];
8
9 const items = [
10 /*{
11 key: "scrollSpeed",
12 text: strings["scroll speed"],
13 value: values.scrollSpeed,
14 valueText: getScrollSpeedString,
15 select: [
16 [constants.SCROLL_SPEED_FAST_X2, `${strings.fast} x2`],
17 [constants.SCROLL_SPEED_FAST, strings.fast],
18 [constants.SCROLL_SPEED_NORMAL, strings.normal],
19 [constants.SCROLL_SPEED_SLOW, strings.slow],
20 ],
21 },*/
22 /*{
23 key: "reverseScrolling",
24 text: strings["reverse scrolling"],
25 checkbox: values.reverseScrolling,
26 },*/
27 /*{
28 key: "diagonalScrolling",
29 text: strings["diagonal scrolling"],
30 checkbox: values.diagonalScrolling,
31 },*/
32 {
33 key: "scrollbarSize",
34 text: strings["scrollbar size"],
35 value: values.scrollbarSize,
36 valueText: (size) => `${size}px`,
37 select: [5, 10, 15, 20],
38 },
39 {
40 key: "scrollbarHeight",
41 text: strings["scrollbar height"] || "Scrollbar height",
42 value: values.scrollbarHeight,
43 valueText: (size) => `${size}px`,
44 select: [20, 30, 40, 50, 60],
45 },
46 {
47 key: "scrollPastEnd",
48 text: strings["scroll past end"],
49 value: values.scrollPastEnd ?? "medium",
50 info: strings["settings-info-scroll-past-end"],
51 valueText: (val) => {
52 switch (val) {
53 case "none":
54 return strings.none;
55 case "small":
56 return strings.small;
57 case "medium":
58 return strings.medium;
59 default:
60 return strings.full;
61 }
62 },

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected