Add more options to Scrollbar (#1174)

* Make `Scrollbar` accept a table for its options

* Add `force_status`, `{expanded,shrinked}_size` options to `Scrollbar`

* Add `Scrollbar:set_forced_status`

* Add `config.force_scrollbar_status` to force `DocView` scrollbars status
This commit is contained in:
Guldoman
2022-11-01 18:38:50 -04:00
committed by GitHub
parent 0f160e614e
commit ed226c476e
4 changed files with 52 additions and 14 deletions
+2 -2
View File
@@ -59,8 +59,8 @@ function View:new()
self.scroll = { x = 0, y = 0, to = { x = 0, y = 0 } }
self.cursor = "arrow"
self.scrollable = false
self.v_scrollbar = Scrollbar("v", "e")
self.h_scrollbar = Scrollbar("h", "e")
self.v_scrollbar = Scrollbar({direction = "v", alignment = "e"})
self.h_scrollbar = Scrollbar({direction = "h", alignment = "e"})
self.current_scale = SCALE
end