Commit Graph

731 Commits

Author SHA1 Message Date
Francisco Vallarino
c66263ef97 Add findWidgetByPath. Add unit tests for both findWidgetByPoint and findWidgetByPath 2021-02-03 16:36:01 -03:00
Francisco Vallarino
22e939be28 Return WidgetNodeInfo instead of path in widgetFindByPoint 2021-02-02 22:19:42 -03:00
Francisco Vallarino
b67447ef43 Add option to avoid adding outer area to size req in Container and Single (main use case is tooltip, since it is non visible in place) 2021-02-02 21:11:59 -03:00
Francisco Vallarino
7ef83e0a83 Do not show tooltip if dragging is in place 2021-02-02 20:57:06 -03:00
Francisco Vallarino
a28beaa705 Remove unneeded locks (issues were caused when adding overlays from a draggable) 2021-02-02 20:55:32 -03:00
Francisco Vallarino
1dc2849624 Remove Default constraint from InputField 2021-02-02 18:15:42 -03:00
Francisco Vallarino
4fffcbc988 Avoid scissoring if not needed 2021-02-02 17:33:57 -03:00
Francisco Vallarino
cb90d5832a Update widgets using createOverlay to consider offset (mainly from scroll) 2021-02-02 16:50:55 -03:00
Francisco Vallarino
0ea0ca0717 Fix visibility issue when scrolling 2021-02-01 19:11:08 -03:00
Francisco Vallarino
ed80c5bb6d Rename references of renderArea to viewport 2021-02-01 18:27:37 -03:00
Francisco Vallarino
99d6856ac3 Handle scrolling based on offset instead of resize of children nodes 2021-02-01 18:05:10 -03:00
Francisco Vallarino
5a23225670 Keep track of active viewport and offset in WidgetEnv 2021-02-01 13:11:51 -03:00
Francisco Vallarino
6cd3a0ee5a Add hook to modify event passed down to children in Container. Restore partial logic for fast scroll. Pending major changes regarding viewport 2021-02-01 12:16:56 -03:00
Francisco Vallarino
596c423873 Add support for modifying wenv passed to children in Container. Use it to create ThemeSwitcher 2021-02-01 00:15:49 -03:00
Francisco Vallarino
0f089c603e Put config arguments before children arguments in widgets that receive other widgets at creation time 2021-01-31 18:40:51 -03:00
Francisco Vallarino
1c7932b892 Do not save context in NanoVGRenderer actions. Instead, delegate that responsibility to consumers 2021-01-31 17:57:53 -03:00
Francisco Vallarino
5fe2c90416 Remove AcceptDrop request 2021-01-31 17:41:13 -03:00
Francisco Vallarino
32414be622 Draw dragged node as part of draggable 2021-01-31 15:34:30 -03:00
Francisco Vallarino
8654e28066 Add transformation to Renderer 2021-01-31 15:30:16 -03:00
Francisco Vallarino
f3c251ead1 Add missing cursor config option in StyleState 2021-01-30 17:11:49 -03:00
Francisco Vallarino
63da394281 Add unit tests for Drag & Drop 2021-01-30 17:04:52 -03:00
Francisco Vallarino
5508d2896d Enhance draggable and dropTarget. Improve styling and event handling 2021-01-30 15:21:33 -03:00
Francisco Vallarino
f5b21d0599 Add Drag&Drop infrastructure. Add initial versions of Draggable and DropTarget 2021-01-30 00:08:49 -03:00
Francisco Vallarino
8a8bdbc17b Check size actually changed before raising resize event 2021-01-28 22:42:27 -03:00
Francisco Vallarino
c9de4fbd87 Add onDispose and onResize event handlers to composite 2021-01-28 19:47:56 -03:00
Francisco Vallarino
15b0251f70 Refactor sample dark theme. Add sndColor to StyleState. Attempt to reduce confusion regarding color use 2021-01-28 18:23:07 -03:00
Francisco Vallarino
35f70a4773 Add option to align text to baseline 2021-01-27 16:56:32 -03:00
Francisco Vallarino
3d9518f3ae Import larger color table 2021-01-26 23:33:15 -03:00
Francisco Vallarino
f4d919f902 Add option to draw checkbox mark as a times x sign 2021-01-26 22:59:15 -03:00
Francisco Vallarino
5650d21e7b Use WidgetId in WidgetRequest instead of Path when possible. Minor code reorganization 2021-01-26 15:11:17 -03:00
Francisco Vallarino
289993f569 Accumulate requests in WidgetStep, to be able to validate them in tests (ignored by main) 2021-01-26 00:03:58 -03:00
Francisco Vallarino
273742ce1a Handle multiple lines in tooltip 2021-01-25 22:50:03 -03:00
Francisco Vallarino
89aa1ef9c5 Add (optional) max repetitions to RenderEvery request. Improvements/additions to tooltip 2021-01-25 13:52:39 -03:00
Francisco Vallarino
7f60e3e8e5 Add tooltip widget (initial commit) 2021-01-24 16:16:04 -03:00
Francisco Vallarino
ed83cbce83 Unify integralField and floatingField into numericField. Rename to FromFractional and reduce constraints in Dial. 2021-01-24 12:23:21 -03:00
Francisco Vallarino
c05b70cdc4 Default cursor position to end for input field 2021-01-23 15:02:23 -03:00
Francisco Vallarino
dc5b4978cc Rename modKC/modKA to reflect the expected keys, and clarify tests are written asumming macOS (it was confusing). Add clipboard test 2021-01-23 14:43:45 -03:00
Francisco Vallarino
c2fc4d56d2 Improve handling of mod keys in keystroke. Add configuration option to ignore matching children events 2021-01-23 13:56:48 -03:00
Francisco Vallarino
f64c3c7758 Add keystroke component 2021-01-22 20:15:36 -03:00
Francisco Vallarino
1e5cbae32c Add test for visibility/focus handling when switching layers in stack/composite 2021-01-21 15:52:36 -03:00
Francisco Vallarino
af016e48c6 Add test for focus handling when switching layers in zstack. Fix issue that discarded events when resizing 2021-01-21 15:30:32 -03:00
Francisco Vallarino
3d1cdbc5f0 Minor rename and reorganization 2021-01-21 13:23:46 -03:00
Francisco Vallarino
5419c158a4 Do not change focus on zstack if it has been previously set 2021-01-21 11:58:43 -03:00
Francisco Vallarino
eecaa4b7e3 Add node to arguments of handleEvent. Make confirm set focus to accept button if visible and focused 2021-01-21 00:25:21 -03:00
Francisco Vallarino
95bf96174b Add onVisibleChange and onEnableChange to composite. Also add onInit, to replace the previous Maybe parameter. Update alert/confirm 2021-01-20 23:17:26 -03:00
Francisco Vallarino
e625e02830 Keep previously focused path on zstack 2021-01-20 14:02:05 -03:00
Francisco Vallarino
c7340bd724 Minor code reorganization 2021-01-20 11:22:19 -03:00
Francisco Vallarino
3a742073a6 Rename updateSizeReq/nodeUpdateSizeReq to getSizeReq/nodeGetSizeReq in tests 2021-01-20 00:14:54 -03:00
Francisco Vallarino
9ae305496b Add dial unit tests 2021-01-20 00:11:04 -03:00
Francisco Vallarino
9588d82ebd Complete split tests 2021-01-19 20:09:12 -03:00