Commit graph

20 commits

Author SHA1 Message Date
Jonathan Johnson
f1a2a711ff
Multi-window support
Closes #91

There's some details to still figure out, which are in new issues:

- #109: When opening a window, no handle is returned that gives access to the
  window from the opener. Technically this can all be wired up manually,
  with exception of requeesting the window close.
- #107: How can a window close itself? Once we have a handle type, we still
  need a mechanism to allow a button on a window request that the window
  closes gracefully. The examples that currently close the window
  call exit instad.
2023-12-21 14:57:29 -08:00
Jonathan Johnson
7ae4374411
ColorSource picker 2023-12-15 14:01:31 -08:00
Jonathan Johnson
55eea5fad3
Added Copy to Clipboard to theme editor
This also wires up the beginnings of the application type
2023-12-03 07:38:56 -08:00
Jonathan Johnson
3f8885efbe
Callback handles are now managed
Installing a callback now returns a CallbackHandle. All map-style APIs
install this handle automatically on the created dynamic, which keeps
the callback installed until the dynamic is freed. All other APIs
return the handle for the caller to either call persist() or store
somewhere.

Now, the dynamic system can be used for application-long data with
almost no fear of leaking data due to how callbacks are being installed.
Technically cycles are still possible by moving clones into the
callbacks, so a WeakDynamic type might be worth exposing.
2023-12-01 13:31:42 -08:00
Jonathan Johnson
b2fdf06e60
Dynamic now requires PartialEq
This reduces the complexity of operations capable with Dynamic, and also
makes it easier to shortcut deadlocking operations.
2023-11-23 11:53:59 -08:00
Jonathan Johnson
dd38fa7bf4
More fluent APIs 2023-11-22 05:54:35 -08:00
Jonathan Johnson
c39f8f33ad
Rewrote text input
Also implemnted secure/masked input

Closes #58
2023-11-16 15:34:26 -08:00
Jonathan Johnson
54e01f1911
Checkbox, ButtonKind, linked/linked_string + more 2023-11-14 20:39:29 -08:00
Jonathan Johnson
4c7c3be5ba
Helpers galore 2023-11-14 09:31:56 -08:00
Jonathan Johnson
b1ae9efae2
ColorScheme[Builder] 2023-11-13 16:28:20 -08:00
Jonathan Johnson
ee3813f44d
Switcher, h/v expand 2023-11-13 09:14:38 -08:00
Jonathan Johnson
96d407ddc2
Container, query_parent_style 2023-11-12 13:37:32 -08:00
Jonathan Johnson
849710dbb1
Diverging from material
Introducing two new colors:

- ColorTheme::color_dim, for dimmed/disabled primary colors
- SurfaceTheme::opaque_widget, for buttons.

In material design, a button's background color uses the Highest
Container role, which seems incorrect because then buttons wouldn't have
a different color when placed inside of the highest level container.

Rather than remove a container level, I added one more tone using the
neutral variant.

Other changes are just gut feelings to have a slightly richer dark
theme. I feel like material is a little muddy in dark mode.
2023-11-12 07:55:28 -08:00
Jonathan Johnson
d07dcdc9aa
Paired dynamics are now possible
Also sliders look better
2023-11-11 16:51:07 -08:00
Jonathan Johnson
019412543c
Lerp for ThemeMode 2023-11-11 13:47:35 -08:00
Jonathan Johnson
27d5baef5d
ThemeMode 2023-11-11 13:41:34 -08:00
Jonathan Johnson
eb4b24f4a9
Slider 2023-11-11 09:42:53 -08:00
Jonathan Johnson
d844a44b33
Refactored LabelBackground to WidgetBackground 2023-11-10 18:15:45 -08:00
Jonathan Johnson
81f6f8c4d3
Theme example reacts 2023-11-10 18:11:31 -08:00
Jonathan Johnson
89dcffdda7
Added theme visualizer example
A very good test of the stack widget.
2023-11-10 13:26:44 -08:00