Commit graph

99 commits

Author SHA1 Message Date
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
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
c39f8f33ad
Rewrote text input
Also implemnted secure/masked input

Closes #58
2023-11-16 15:34:26 -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
Jonathan Johnson
42840b950c
Hover updates after widget removal
This also fixes some inconsistencies that arose when the focus widget
was "stuck" on a removed widget. Button previously handled it hackily in
a redraw function, but now Gooey handles it automatically without
needing to wait for a repaint.
2023-11-15 12:41:41 -08:00
Jonathan Johnson
5506a24dae
Added WidgetCacheKey 2023-11-15 10:36:00 -08:00
Jonathan Johnson
534f676ef0
Enable/disable is now handled for all widgets
Closes #66
2023-11-15 10:23:42 -08:00
Jonathan Johnson
5a9aa6b55d
Tic-tac-toe, Buttons labels now stretch to fill 2023-11-15 09:32:28 -08:00
Jonathan Johnson
947f1cd8a7
Stack with premeasured content now work
This makes nested scroll areas work correctly.
2023-11-15 07:47:23 -08:00
Jonathan Johnson
54e01f1911
Checkbox, ButtonKind, linked/linked_string + more 2023-11-14 20:39:29 -08:00
Jonathan Johnson
89c8805924
Refactored switcher to use Dynamic<WidgetInstance> 2023-11-14 13:24:23 -08:00
Jonathan Johnson
4c7c3be5ba
Helpers galore 2023-11-14 09:31:56 -08:00
Jonathan Johnson
b72e4b0caf
Optimizing Stack layout in Known dimensions 2023-11-14 07:59:13 -08:00
Jonathan Johnson
a04619a279
Layout caching, Lerp underflow fix, label fix 2023-11-14 07:38:39 -08:00
Jonathan Johnson
cc7d4bac45
Merge pull request #74 from ModProg/button-fun
button outline without drawing
2023-11-13 16:29:41 -08:00
Jonathan Johnson
40343e163f
Scroll fixes, resize helpers 2023-11-13 11:30:45 -08:00
Jonathan Johnson
ee3813f44d
Switcher, h/v expand 2023-11-13 09:14:38 -08:00
Roland Fredenhagen
90884a8184
format 2023-11-13 17:03:53 +01:00
Roland Fredenhagen
7467f6408e
working outline 2023-11-13 17:03:53 +01:00
Roland Fredenhagen
4a4578bdd6
button outline without drawing 2023-11-13 17:03:51 +01:00
Jonathan Johnson
07b93397c5
Optimizations 2023-11-12 19:54:10 -08:00
Jonathan Johnson
96d407ddc2
Container, query_parent_style 2023-11-12 13:37:32 -08:00
Jonathan Johnson
2a50bb32d4
define_components embrace, sanitize, docs, export 2023-11-12 09:21:49 -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
b3bef345a5
Tweaking highlight color and focus ring drawing 2023-11-12 07:24:59 -08:00
Jonathan Johnson
022880822c
Rest of merge
I started making more changes, and I lost track of what was merge
related and what wasn't, so I committed the merge with what was staged,
but it probably didn't compile.

This is the remaining changes to get things back to a state I'm happy
with, mostly tweaking the constrast behavior.
2023-11-11 20:20:09 -08:00
Jonathan Johnson
6220394df2
Merge branch 'main' into button-fun 2023-11-11 20:18:06 -08:00
Roland Fredenhagen
a5dfd06f90
more styles 2023-11-12 02:15:09 +01:00
Jonathan Johnson
d07dcdc9aa
Paired dynamics are now possible
Also sliders look better
2023-11-11 16:51:07 -08:00
Roland Fredenhagen
83cb88925a
Make button take MakeWidget 2023-11-12 00:38:43 +01:00
Jonathan Johnson
27d5baef5d
ThemeMode 2023-11-11 13:41:34 -08:00
Jonathan Johnson
68339dfb62
Scroll fixes 2023-11-11 10:23:24 -08:00