Commit graph

341 commits

Author SHA1 Message Date
Jonathan Johnson
c2bd9911ca
Started a List widget
a la HTML's <ul> tag.
2024-01-13 06:04:41 -08:00
Jonathan Johnson
1b97b39857
Label for CowString 2024-01-13 06:02:22 -08:00
Jonathan Johnson
0c36abf28e
Remving debugs 2024-01-13 06:02:10 -08:00
Jonathan Johnson
9bd78c648b
Switcher now unmounts
This isn't quite perfect, as a Switcher shared with multiple windows
will only unmount in one window.
2024-01-13 05:55:07 -08:00
Jonathan Johnson
02e90e48c6
Image aspect scaling now requests sizes 2024-01-13 05:54:51 -08:00
Jonathan Johnson
c242009cb8
Fixing set_font_family to not be sticky 2024-01-13 05:52:27 -08:00
Jonathan Johnson
f8cb7e7f32
Added the Delimiter widget 2024-01-12 15:44:18 -08:00
Jonathan Johnson
856fb6231b
Updating Kludgine to fix MSRV 2024-01-12 07:08:27 -08:00
Jonathan Johnson
cc207fbf8c
Added optional plotters integration
Closes #133

The real work was done in Kludgine.
2024-01-11 20:52:40 -08:00
Jonathan Johnson
e2f8e04670
Fixing infintite loop in ColorSchemeBuilder
`generate_error` can technically fail to generate a contrasting color if
the primary color is desaturated too much. This is beacuse we never
increase the saturation.

This change makes the color scheme builder stop one iteration shy of a
full circle.
2024-01-11 14:58:27 -08:00
Jonathan Johnson
bd13003cbb
Finishing sentence in docs 2024-01-11 09:53:03 -08:00
Jonathan Johnson
55b43cb4aa
Renamed example
Also fixed a comment I missed updating
2024-01-11 09:49:27 -08:00
Jonathan Johnson
956e4109f9
Added InvalidationBatch 2024-01-11 09:47:51 -08:00
Jonathan Johnson
64ad120be6
Clipping the checkerboard pattern 2024-01-11 07:17:38 -08:00
Jonathan Johnson
d701e179ae
Fixing ComponentPicker<Alpha>'s loupe coloring
The previous fix was a fix in contrast_between. However, I then
convinced myself that the selected color was changing when it wasn't
purely because the alpha picker utilizes a checkeboard pattern, and I
was specifically testing grayscale values.

Aka, I was reproducing the "different grays" optical illusion using the
loupe outline color and driving myself crazy trying to figure out what
my code was doing, when in reality it wasn't doing anything.

The real fix? Don't ask for contrast between two similar colors.
OutlineColor and TextColor are both meant to be contrasting colors to
SurfaceColor, which is the background color. The loupe color really
should have switched between any surface-type color and any
foreground-type color, but it instead was asking for two different
foreground colors.
2024-01-11 07:10:45 -08:00
Jonathan Johnson
6958c6863c
Fixing Color::contrast_between
While working on the color pickers, I was noticing the contrast_between
choices seem a little off.
2024-01-11 07:09:17 -08:00
Jonathan Johnson
8a274df730
Added more color pickers
This set of changes is making me think of adding Rgb/Rgba types and
having our own color enum.
2024-01-10 13:27:12 -08:00
Jonathan Johnson
246352fed2
Added HslPicker 2024-01-10 08:17:09 -08:00
Jonathan Johnson
6ad6cca32d
Children renamed to WidgetList
Plus more work on the user's guide, which inspired the rename.
2024-01-09 13:26:14 -08:00
Jonathan Johnson
b5bd69136a
Linking to user guide 2024-01-09 07:08:15 -08:00
Jonathan Johnson
93775bc542
Moved guide "warning" to all pages
This required overriding the main theme file to position it where I
wanted it to be. head.hbs puts it above the button bar, and header.hbs
puts it outside the page area entirely.
2024-01-09 06:53:18 -08:00
Jonathan Johnson
7be9894404
Trying to make Mac CI fail gracefully
This message may be repeated multiple times as I work on the CI
configuration.
2024-01-08 09:41:04 -08:00
Jonathan Johnson
7500a6b20f
Trying to make Mac CI fail gracefully
This message may be repeated multiple times as I work on the CI
configuration.
2024-01-08 09:20:10 -08:00
Jonathan Johnson
97ab3cd1a3
Trying to make Mac CI fail gracefully
This message may be repeated multiple times as I work on the CI
configuration.
2024-01-08 09:18:53 -08:00
Jonathan Johnson
d7fde0815f
Trying to make Mac CI fail gracefully
This message may be repeated multiple times as I work on the CI
configuration.

Refs #129
2024-01-08 09:17:03 -08:00
Jonathan Johnson
5556d2ea6d
FlexibleDimension now implements Zero 2024-01-08 09:07:17 -08:00
Jonathan Johnson
adb51dba7e
More user guide work 2024-01-07 15:57:23 -08:00
Jonathan Johnson
01d6da3d35
Added layout widget descriptions 2024-01-07 11:49:39 -08:00
Jonathan Johnson
b82208887d
Standardizing durations
I didn't notice I had settled on 1 second for all three stages in
the end lol.
2024-01-06 15:05:11 -08:00
Jonathan Johnson
8c3eaf4b6b
Fixing MSRV
I had forgotten why I had `self::image::Image` and it was causing the
docs to show up out of order. This now makes them all consisent, fixing
the docs issue.
2024-01-06 14:57:59 -08:00
Jonathan Johnson
882ec6f4aa
Fixing warnings + missing docs 2024-01-06 14:57:46 -08:00
Jonathan Johnson
e548f1255d
Closing no longer repeats
Closes #108

Turns out there was a property on KeyEvent this whole time... oops.
2024-01-06 14:55:49 -08:00
Jonathan Johnson
cda13c42a2
Guide intro + KeyEvent
Also fixed virtual window's refresh handling.
2024-01-06 14:46:48 -08:00
Jonathan Johnson
31de0bc458
Fixing asset link
And a little more filler
2024-01-06 11:01:56 -08:00
Jonathan Johnson
8fb372e743
Work on guide 2024-01-06 10:26:23 -08:00
Jonathan Johnson
bb28f96b58
Space fix 2024-01-06 10:25:45 -08:00
Jonathan Johnson
1b608b39af
Removing direct winit access
This was a holdover while I was still implementing the PlatformWindow
interface. Cushy widgets shouldn't be able to access winit directly,
otherwise they could cause unwanted effects when not running in a
standalone Cushy app but rather embedded in a game.
2024-01-05 18:17:44 -08:00
Jonathan Johnson
a3e76f6472
Calling set_ime_cursor_location
Currently passing the entire input area because it's easy. Not closing
the issue because the correct thing to do would be to constrain the
location to a smaller area on the current line (or the current line).

Refs #122
2024-01-04 17:08:05 -08:00
Jonathan Johnson
4dc5cb5cc4
Merge pull request #123 from khonsulabs/offscreen
Initial implementation of offscreen rendering
2024-01-04 16:10:33 -08:00
Jonathan Johnson
5a78788396
Enabling animated transparent capture 2024-01-04 16:09:58 -08:00
Jonathan Johnson
6ff766846f
Added CushyWindow
While working on the changelog, I realized I didn't provide a type that
allowed a third party developer to provide a
PlatformWindowImplementation. This type now completes it.
2024-01-04 15:58:29 -08:00
Jonathan Johnson
a197bb5e81
Unit-tested, auto-generated screenshots
This commit adds my first take at creating a harness for a user's guide
using the new capture functionality. The example has tests that ensure
the align widget creates the expected results.
2024-01-04 13:56:45 -08:00
Jonathan Johnson
eb20133116
Reinstating weak_clone and non-weak callbacks
Somehow I missed that my changes for weak callbacks broke the theme
editor. I thought I had it working with the try_get changes, but I
discovered several flaws in this approach.

In the end, ownership has been transferred to the CallbackHandle, and a
CallbackHandle can relinquish its reference to create weak graphs. This
is how weak_clone now works.
2024-01-04 13:56:26 -08:00
Jonathan Johnson
36b80e8f34
Moved frame mapping to its own thread
This ensures frames render consistently.

This change only affects the animation recorder. The regular virtual
recorder interface blocks when refresh is called.
2024-01-03 20:15:00 -08:00
Jonathan Johnson
bc52be440f
Added animation recording + event wiring
Not great, but it technically exists.
2024-01-03 17:45:11 -08:00
Jonathan Johnson
2e2d45d281
Switching wgpu dependencies
This now matches the current CI config on wgpu's repository.
2024-01-03 12:24:22 -08:00
Jonathan Johnson
5a56833cd0
Switching text matrix to continue jobs 2024-01-03 11:44:15 -08:00
Jonathan Johnson
cdef6bcbc3
Removed unnecessary bytemuck usage
This was copy-pasted from a Buffer<T> implementation that was removed
from Kludgine, since Buffer<T> isn't public.
2024-01-03 11:41:26 -08:00
Jonathan Johnson
be0399279c
Initial implementation of offscreen rendering 2024-01-03 11:35:43 -08:00
Jonathan Johnson
244797110e
Added to_ variants for into_ functions 2024-01-02 15:07:06 -08:00