Commit graph

178 commits

Author SHA1 Message Date
Jonathan Johnson
bd37279282
Resizable windows now expand automatically
This expansion only triggers if the root widget measures larger than the
window's current size. We can't set a minimum size explicitly unless a
Resize widget is present, as we don't have enough knowledge to ensure
that the exact measurement we received was indeed the smallest layout in
any given direction. We only know that given the current constraints,
the returned measurement was the smallest possible. All future queries
will have to still be done again, as any change to the constraints could
impact the measured size.
2023-11-29 19:05:43 -08:00
Jonathan Johnson
03e93adb15
Select buttons 2023-11-29 17:14:42 -08:00
Jonathan Johnson
63a4549f29
Tested buttons in buttons 2023-11-29 15:42:06 -08:00
Jonathan Johnson
ce6935a7a7
Making it easier to draw focus correctly 2023-11-29 15:08:12 -08:00
Jonathan Johnson
0684ac59bf
Background input highlight fixes 2023-11-29 15:01:57 -08:00
Jonathan Johnson
b1ec2c5e49
Focus in bg 2023-11-29 14:52:17 -08:00
Jonathan Johnson
d23226ffe6
Updating kempt 2023-11-29 14:31:25 -08:00
Jonathan Johnson
9146c920ac
Expand and stack fixes 2023-11-29 11:43:52 -08:00
Jonathan Johnson
589c3dbc7f
MakeWidget for Dynamic<WidgetInstance> + option 2023-11-29 11:42:51 -08:00
Jonathan Johnson
c0d714331b
Merge branch 'main' of github.com:khonsulabs/gooey 2023-11-28 10:15:10 -08:00
Jonathan Johnson
8e19a89bca
Added font size + heading helpers 2023-11-28 10:14:55 -08:00
Jonathan Johnson
bb8b82404b
Fixing MacOS compilation 2023-11-28 07:06:12 -08:00
Jonathan Johnson
3f2aace55e
Debouncing 2023-11-27 10:09:42 -08:00
Jonathan Johnson
aeb55e0b94
run_in_bg and Dynamic<&'static str> 2023-11-27 09:27:37 -08:00
Jonathan Johnson
4d31719392
Merge pull request #75 from khonsulabs/feature/world-coords
world coords and hover state for tilemap (this is very much debug)
2023-11-26 19:31:49 -08:00
Jonathan Johnson
66fd9ba766
Finished mouse handling for tile map 2023-11-26 19:31:03 -08:00
Jonathan Johnson
273aac65bb
Merge branch 'main' into feature/world-coords 2023-11-26 19:11:49 -08:00
Jonathan Johnson
e15ae59c5c
Refactored root resize behavior
Closes #84, Closes #77, Closes #78
2023-11-25 12:00:59 -08:00
Jonathan Johnson
0fd8a9487f
Validations 2023-11-25 07:43:04 -08:00
Jonathan Johnson
f107267409
Validations 2023-11-24 14:29:06 -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
b63e4d66d2
Bug fixes 2023-11-22 18:53:41 -08:00
Jonathan Johnson
15480ba68b
Added Collapse widget
Also tweaked progress bar animation
2023-11-22 15:46:58 -08:00
Jonathan Johnson
3e651c2964
CursorIcon + disabled refactoring
Input can now accept focus while disabled, and all controls should do
the right thing with regard to cursor icons now.
2023-11-22 12:06:29 -08:00
Jonathan Johnson
00cb29d261
Centering checkbox ornament 2023-11-22 10:55:33 -08:00
Jonathan Johnson
c9566fe1bd
Radio, Checkbox refactor 2023-11-22 10:48:26 -08:00
Jonathan Johnson
23ba9ce11f
Improved input editing 2023-11-22 08:16:54 -08:00
Jonathan Johnson
ecc08f3f73
Stack gutters honor IntrinsicPadding 2023-11-22 06:21:44 -08:00
Jonathan Johnson
dd38fa7bf4
More fluent APIs 2023-11-22 05:54:35 -08:00
Jonathan Johnson
46a0758d09
Vertical sliders/progress bars
Also fixed checkbox layout after Label no longer pads itself.
2023-11-21 20:41:56 -08:00
Jonathan Johnson
eee336eab0
Progress values are easier to work with 2023-11-21 19:36:00 -08:00
Jonathan Johnson
801337ab7a
Progress bars, repeating animations
Closes #70
2023-11-21 09:53:08 -08:00
Jonathan Johnson
2201f2c83b
Ranged sliders, advance_focus, allow_blur
Closes #60

Stepping in sliders is a compromise due to the flexibility of the
current slider implementation. I don't want to force types to implement
Add, and I don't like forcing types to require a Step (ie, what's the
appropriate value for f32 to specify as its next value?). Using a
percentage combined with lerp keeps the implementation fairly
straightfoward, although I remember experiencing this type of
configuration in another UI framework a long time ago and thinking it
was a little annoying to work with.

Ultimately, setting actual step boundaries can be done by customizing
the type that the slider is operating over. I feel like that's a much
more powerful design than I've experienced in previous frameworks, so
I'm hoping this percent step behavior is a reasonable compromise.
2023-11-20 19:44:03 -08:00
Jonathan Johnson
8f2ff1b5dc
Sliders now draw round-rect tracks 2023-11-20 12:13:31 -08:00
Jonathan Johnson
bb66803653
Custom widget, layout size rounding
Closes #56
2023-11-20 10:11:10 -08:00
Jonathan Johnson
9c1c77f9b1
Updated winit 2023-11-20 06:32:58 -08:00
Jonathan Johnson
4af82ae188
Component type safety, some font support 2023-11-19 21:52:45 -08:00
Jonathan Johnson
92249047ce
Fixing Input selection to the left of the input 2023-11-19 15:46:52 -08:00
Jonathan Johnson
ca58cb5fcf
Fixing password field clicking 2023-11-19 15:38:26 -08:00
Jonathan Johnson
7992887a85
Unused import 2023-11-19 14:51:03 -08:00
Jonathan Johnson
f389048e43
Outline drawing is now fixed to always be inside 2023-11-19 14:49:23 -08:00
Jonathan Johnson
9be92c181c
Forcing outlines to be whole pixels 2023-11-19 14:39:48 -08:00
Jonathan Johnson
9403e85901
MSAA + outlines are now inset
Inset outlines may not be the right approach, but it simplifies
potential alignment issues caused by insetting all filled background
drawing by half the width of the focus ring.
2023-11-19 14:29:21 -08:00
Jonathan Johnson
d5bde44e27
Subpixels + Feathering + figures refactor
Much curves
2023-11-19 10:34:06 -08:00
Jonathan Johnson
aea9def07d
Rounded rect drawing 2023-11-18 14:45:02 -08:00
Jonathan Johnson
8ae315e229
Drawing refactor from Kludgine 2023-11-17 08:07:37 -08:00
Jonathan Johnson
01d45a836f
Fixing Gooey compilation on MacOS
After trying to run Gooey again on my Mac for the first time in a few
weeks, I found that I ran into the Condvar issue again. Rather than
pasting AssertUnwindSafe in those files, I've both reported the
discrepency in unwind safety (rust-lang/rust#118009) and moved the
workaround into a type that only uses AssertUnwindsafe when compiling
for Apple.
2023-11-17 06:20:20 -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
a8841e6f1c
Merge branch 'main' into feature/world-coords 2023-11-15 18:45:39 -08:00
Jonathan Johnson
1ed1a95a1d
Input copy/paste works now
Also updated to wgpu 0.18.1
2023-11-15 14:25:59 -08:00