Adam
1c5936e697
Fixup minor drawing issue.
2022-10-18 16:01:32 -04:00
Guldoman
6b754eb628
Refactor scrollbar into its own file ( #1124 )
...
* Move scrollbar to its own file
* Don't call `Scrollbar` functions if `View` is not scrollable
* Allow horizontal scrolling in `Scrollbar`
* Add horizontal scrollbar to `View`
* Add `root:horizontal-scroll` command with `shift+wheel` keymap
* Prioritize vertical scrollbar hover
* Don't send mouse movement to vertical scrollbar when dragging horizontal one
* Fix clicking on horizontal scrollbar track
* Implement `start` scrollbar alignment
* Add documentation to `Scrollbar`
* Make `DocView` infinitely scrollable horizontally
* Handle horizontal scroll SDL event
2022-10-15 20:12:15 -04:00
Guldoman
5c2c95765e
Add IME support ( #991 )
2022-10-15 19:58:51 -04:00
Jefferson González
0fc793d1ae
Add on_scale_change event to View ( #1146 )
...
* core view: emit on_scale_change event
* core titleview: reconfigure hit_test on rescale fixes #1144
2022-10-11 14:44:32 -04:00
jgmdev
3f206db69a
initial documentation for better code completion
2022-06-07 22:09:34 -04:00
Guldoman
9de75988ba
Send `mouseleft` event when the mouse leaves the window ( #928 )
...
* Send `mouseleft` event when the mouse leaves the window
* Call `View:on_mouse_left` when the mouse leaves the `View`
Previously `View:on_mouse_left` was called only when the mouse left the
window, and it was called on every visible `View`.
Now it gets also called when the mouse "changes" `View`, and only the
last `View` the mouse was on will receive the event.
2022-04-28 21:50:34 -04:00
Guldoman
a7ea84ae8f
Clamp scroll position when dragging the scrollbar without animations
2022-04-26 22:50:44 +02:00
Guldoman
444b3e3c66
Don't animate scrolling by dragging the scroll bar ( #940 )
...
Also added the `config.animate_drag_scroll` option to re-enable the
behavior.
2022-04-26 09:54:11 -04:00
Guldoman
f42dbb0060
Add animation categories to enable finer transitions control ( #941 )
...
* Allow finer control over transitions
* Add categories to transitions
2022-04-25 20:35:35 -04:00
Guldoman
43086a9c24
Fix missing pixel in scrollbar
2022-04-12 03:20:27 +02:00
Guldoman
48c371a638
Add scrollbar "track" and resize on hover
2022-04-12 02:56:30 +02:00
Guldoman
3d879286a4
Use epsilon to compare values in `move_towards`
2022-03-01 22:41:54 +01:00
Guldoman
539f929e30
Allow intercepting `filedropped` events
...
The event is first sent to the underlying `View`; if not handled, it's
managed as before.
2022-02-15 00:45:59 +01:00
Adam Harrison
96db380c73
Manual merge of into .
2021-11-23 15:57:22 -05:00
Adam Harrison
50c0659445
Also changed docview mousewheel into a scroll command.
2021-11-14 15:41:28 -05:00
Adam Harrison
ce2ec9f442
Moved commands out to the outer event loop.
2021-11-14 15:41:28 -05:00
Adam Harrison
6f53ee1b69
Added in double, and triple clicking.
2021-11-14 15:41:28 -05:00
Adam Harrison
612818ca05
Added in clicks to keymap.
2021-11-14 15:41:28 -05:00
Francesco Abbate
cb08c5cbb7
Fix dirty pixels problem on window's right side
...
The last column of pixel on the window's right side isn't correctly
drawn and pixels appear dirty and more noticeably when the a NagView
message was previously shown, a stripe of red pixels remains on the right.
We use now a more souding roundig scheme. Now the rectangles to clip or to
draw are passed around as Lua numbers without any rounding. In turns, when
the rect coordinates are passed to the renderer we ensure the border of the
rect are correctly snapped to the pixel's grid. It works by computing the
coordinates of the edges, round them to integers and then compute the rect's
width based on the rounded coordinates values.
2021-10-10 14:52:55 +02:00
Guldoman
0a52861129
Revert horizontal scroll implementation
2021-09-08 07:11:50 +02:00
Guldoman
92bbb30d06
Split vertical and horizontal scrollbar-related functions and variables
2021-08-30 17:58:22 +02:00
Guldoman
5c7b133e0b
Add horizontal scrollbar
...
Classes and plugins that relied on having only the vertical scrollbar
should continue working.
2021-08-30 17:58:22 +02:00
Guldoman
f1ca00fbed
Extend `View` to allow horizontal scrolling
2021-08-30 17:58:22 +02:00
Francesco Abbate
d46475532f
Introduce View objects context property
...
Used to determine if an instance of the given class should
be closed or not when a project session is terminated.
2021-08-27 23:55:17 +02:00
takase1121
6bcdaa9d7a
Revert "fix number of parameters passed to self:move_towards"
...
Apparently the LSP intellisense is wrong on this one, this actually
causes an infinite loop
2021-07-15 18:01:27 -04:00
takase1121
169b8abae5
fix number of parameters passed to self:move_towards
...
self:move_towards(self) causes self to be passed twice, ignoring rate
2021-07-15 18:01:24 -04:00
Francesco Abbate
f9115751b4
Minor simplification of animation rate adjustment
2021-03-20 17:00:43 +01:00
Francesco Abbate
26ec9e5820
Compute animation rate only if needed
2021-03-18 16:20:21 +01:00
liquidev
844ecd1f26
Make animation speed independent of config.fps, add config.animation_rate to fine-tune animation speed ( #93 )
...
* animation rate config field
* @franko's math magic to make it look more correct
2021-03-10 16:35:37 +01:00
Francesco Abbate
2353076b37
Add config.transitions to enable/disable transitions
2021-02-21 11:08:25 +01:00
rxi
bc4bf3d384
Added core.set_active_view(); removed `focusable` boolean from View
2020-05-19 14:55:46 +01:00
rxi
9fc185af2f
Added scroll bounds
...
Resolves #9
Resolves #6
Resolves #3
2020-05-02 00:21:04 +01:00
rxi
885ed5f860
Improved handling of zero-sized locked nodes on RootView
2020-05-01 16:17:07 +01:00
rxi
4d39dcaded
Changed `View:get_content_offset()` to round resultant values
...
Avoids some issues that occur with fractional offsets, most noticable
on rectangles drawn on DocView jittering by 1-pixel when scrolling
2020-04-30 14:43:25 +01:00
rxi
d8c4bfa6ba
Initial commit
2019-12-28 11:17:56 +00:00