Commit Graph

131 Commits (9a62e818d1d52300b62e655949c756efb2a9ca92)

Author SHA1 Message Date
Ben Whittaker cdf95566bd Layout: Add `forgetLazyState` method 2021-10-05 20:57:10 -04:00
Ben Whittaker f37b744ed5 Layout: defer initial update until first render 2021-10-05 12:32:06 -04:00
Ben Whittaker 202690de40 Layout: Implement text wrapping 2021-10-04 16:06:46 -04:00
Gordon Williams c5d7a73f4f fix image width/height code 2021-09-30 17:00:46 +01:00
Gordon Williams dd49e1f631 tweaks to reduce layout memory usage 2021-09-29 14:22:36 +01:00
Gordon Williams c96ae6c8ae Minor layout speed tweak 2021-09-29 09:20:56 +01:00
Gordon Williams ee60bda59b Merge branch 'master' of github.com:espruino/BangleApps 2021-09-29 09:18:46 +01:00
Ben Whittaker 3622895f09 Layout: avoid floating point numbers
The previous approach involved calculating the width of each element
independently, and deriving the `x` coordinate of each element by
summing the previous widths. However, if the widths are rounded, summing
them leads to accumulated rounding errors.

This change effectively takes the alternate approach of calculating the
`x` coordinate of each element independently, and then deriving the
widths from the differences between adjacent values of `x`.

As a bonus, this change corrects a couple issues in the
`padding_with_fill` test.
2021-09-28 23:07:00 -04:00
Gordon Williams 912b7e8dbf Minor speed/memory layout tweaks - issue with floating point width/height still outstanding 2021-09-28 11:19:46 +01:00
Ben Whittaker be5539d948 Lazy Layout: don't assume bg is already cleared 2021-09-27 11:00:22 -04:00
Ben Whittaker 221c3acc94 Layout: make `pad` behave more consistently
Fixes the second test case in #819
2021-09-24 17:43:56 -04:00
Ben Whittaker 807ac743fc Layout: only set fillxy/y if null
Fixes #820
2021-09-23 22:32:06 -04:00
Gordon Williams 0109a8114b Ensure padding works correctly (fix #819), also add Layout test harness basics 2021-09-23 12:47:12 +01:00
Gordon Williams bc2ed2f495
Merge branch 'master' into layout-img-object 2021-09-20 10:14:10 +01:00
Gordon Williams fc11f68d2e remove solid bg - not needed now we fill the bg anyway 2021-09-17 19:38:02 +01:00
Gordon Williams e280d192ee More speed improvements, and fix issue with minifier so we don't need .min.js 2021-09-16 11:27:52 +01:00
Gordon Williams 7a9aad93e4 Switch to object lookup for update & render code - around 20% faster 2021-09-16 10:49:14 +01:00
Gordon Williams 76b6ca0bff allow numeric fill values 2021-09-16 10:17:27 +01:00
Ben Whittaker 0c4ac74214 Optimization 2021-09-15 20:28:49 -04:00
Ben Whittaker 74e739d019 Handle bg colors correctly in lazy layout render 2021-09-15 10:13:46 -04:00
Ben Whittaker 6bd606b645 Don't use getModified in lazy layout rendering 2021-09-15 06:00:35 -04:00
Ben Whittaker 95d353a749 Add lazy rendering support to Layout 2021-09-14 20:02:09 -04:00
Richard de Boer 5972b991f9 Layout: add support for "img" with object or ArrayBuffer Graphics object
Rendering these already worked, because we simply pass src to drawImage,
so we just need to determine the correct size.
2021-09-05 20:42:36 +02:00
Gordon Williams 39a263c22d update minified layout 2021-09-03 10:31:03 +01:00
Gordon Williams c34216c884 layout lib tweaks 2021-09-02 11:39:53 +01:00
Gordon Williams 97bdf0b7d0 force use of unminified module for now 2021-08-25 17:06:06 +01:00
Gordon Williams 0410a0dd8e accellog: 0.02: Use the new multiplatform 'Layout' library
Loads of layout lib improvements
2021-08-25 17:00:44 +01:00
Gordon Williams f6b46395fc add first draft of layout module 2021-07-27 17:01:21 +01:00
OmegaRogue 6f26bf47b5
Add pre minified dane_arwes module while automatic minification is broken 2020-12-17 12:01:44 +01:00
OmegaRogue 3a36580ee4 Add Icon for Dane Launcher,
Improve Icon for Dane
add dane_arwes module
2020-12-09 14:56:20 +01:00
Gordon Williams 4c78076603 Allow custom modules for apps 2020-12-09 13:43:29 +00:00