~whereswaldon

North Carolina

https://waldon.blog

Freelance engineer working to make portable GUIs easy and pleasant.

I'm one of Gio's two maintainers, and I focus on making the text and widget APIs great.

Some other fun projects:

  • Arbor, a tree-based, decentralizable chat platform
  • gover, an easy way to install and update Go on any *nix system

If you get value out of my work, please consider sponsoring me on Liberapay or GitHub.

I am also available for hire.

~whereswaldon/public-inbox

Last active 5 days ago

~whereswaldon/arbor-ci

Last active 3 months ago

~whereswaldon/arbor-dev

Last active 1 year, 1 month ago

~whereswaldon/arbor-announce

Last active 2 years ago

~whereswaldon/arbor-infra

Last active 2 years ago

~whereswaldon/pointstar-devel

Last active 3 years ago

~whereswaldon/pointstar-announce

Last active 3 years ago
View more

Recent activity

Re: How to get widget position? 4 days ago

From Chris Waldon to ~eliasnaur/gio

On Mon, Sep 18, 2023 at 2:54 PM <gdaarb@tutanota.com> wrote:
>
> Ok, I got it, I should move drawCircle part onto Area.Layout. Now it works, many thanks.

Precisely! I'm sorry for not putting it more clearly. I made a
cleaned-up version that may be useful as a reference. I basically
removed layout code that didn't really have an impact on the final
layout:

https://go.dev/play/p/YfanMNBgMbN

Cheers,
Chris

Re: How to get widget position? 5 days ago

From Chris Waldon to ~eliasnaur/gio

On Mon, Sep 18, 2023 at 1:02 PM <gdaarb@tutanota.com> wrote:
>
>
> I want to draw circle inside some area(widget.Border) at point where user made mouse click.
> After reading documentation I was able to find how handle mouse events inside widget,
> but position of event seems related to window itself.
> So what is right way to obtain widget-related position? (directly or via shifting "global" position).

The pointer.Event.Position field is a coordinate relative to the
origin of the clipping area that registered the input handler.

More concretely, the most recent clipping area pushed when you do
`pointer.InputOp{}.Add()` will define the coordinate space for the
input events routed to that input handler. The point (0,0) is the

Re: why i got package slices is not in GOROOT 5 days ago

From Chris Waldon to ~eliasnaur/gio

On Mon, Sep 18, 2023 at 7:50 AM Chris Waldon
<christopher.waldon.dev@gmail.com> wrote:
>
> This was a mistake on my part. I accidentally imported the wrong
> version of the slices package. It exists as golang.org/x/exp/slices
> and as the stdlib "slices" package from Go 1.21 onwards. I intended to
> use the package that was compatible with Go 1.20. I've pushed a fix,
> so now Go 1.20 will work if you run:

Correction, update to:

go get gioui.org/x@3246478

Re: Custom text rendering 5 days ago

From Chris Waldon to ~eliasnaur/gio

> I’m now done with Gritty. Thanks for all the help and good luck with Gio :) I enjoyed learning about the immediate mode.

Nice!

> Is it possible to put https://github.com/viktomas/gritty in the Docs showcase section? https://gioui.org/doc/showcase

Would you like to submit a PR here?
https://github.com/gioui/giouiorg/tree/main/content/doc/showcase

We'd be happy to have it in the showcase.

Cheers,
Chris

[PATCH gio] op/clip: prevent no-op path segments 5 days ago

From Chris Waldon to ~eliasnaur/gio-patches

This commit prevents the insertion of LineTo and QuadTo path segments that have
no visible effect on the path (because the path's pen is already at their end state).
This eliminates whisker artifacts from some stroked paths. Thanks to Morlay for the
bug report leading to this fix.

Fixes: https://todo.sr.ht/~eliasnaur/gio/535
Signed-off-by: Chris Waldon <christopher.waldon.dev@gmail.com>
---
 op/clip/clip.go | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/op/clip/clip.go b/op/clip/clip.go
index 2d9a9ba0..279077ea 100644
--- a/op/clip/clip.go
[message trimmed]

Re: Black Text on White Background Appears Washed Out 5 days ago

From Chris Waldon to ~eliasnaur/gio

> I am experiencing an issue with text rendering in Gio UI. When using
> white text on a black background, the text appears clear and crisp.
> However, black text on a white background appears washed out and is
> not as clear. This issue impacts the readability and overall user
> experience of the application.
>
> Is there a specific setting or configuration that needs to be adjusted
> to improve text rendering in such cases? Any help or guidance would be
> appreciated.

Right now there are no configuration options affecting the
rasterization of text. I think your problems are related to:

https://todo.sr.ht/~eliasnaur/gio/68

Re: why i got package slices is not in GOROOT 5 days ago

From Chris Waldon to ~eliasnaur/gio

This was a mistake on my part. I accidentally imported the wrong
version of the slices package. It exists as golang.org/x/exp/slices
and as the stdlib "slices" package from Go 1.21 onwards. I intended to
use the package that was compatible with Go 1.20. I've pushed a fix,
so now Go 1.20 will work if you run:

go get gioui.org/x@f859e99

Cheers,
Chris

Re: Fixing the ergonomics of nested scrollable areas 18 days ago

From Chris Waldon to ~eliasnaur/gio

On Sun, Sep 3, 2023 at 9:26 AM Dominik Honnef <dominik@honnef.co> wrote:
>
> Using nested scrollable areas, as implemented in Gio (and many other
> frameworks), leads to the following two bad user experiences when using
> the scroll wheel:
>
> 1. The user starts scrolling the outer area. The inner scrollable area
>    happens to scroll into view and is positioned under the cursor. The
>    inner area now hijacks the scrolling action, and the user can no
>    longer scroll the outer area without moving their cursor to an area
>    unoccupied by the inner area, assuming there is one.
>
> 2. The user scrolls the inner area but overshoots one of the ends. This
>    causes the outer area to scroll, which is at best jarring, and at

Re: Custom text rendering 22 days ago

From Chris Waldon to ~eliasnaur/gio

On Fri, Sep 1, 2023 at 5:39 AM Tomas <me@viktomas.com> wrote:
>
> Hello again 👋

Hi Tomas!

> I’m still writing the terminal emulator. It’s not working that great, but the code is here https://gitlab.com/viktomas/gritty
>
> I reached a point where the `material.Label` doesn’t work for me and I need to implement custom character grid.
>
> Until now, I counted the available character space
> (https://lists.sr.ht/~eliasnaur/gio/%3CE17329F0-A6E6-45E1-A176-7B1396ECA86D%40viktomas.com%3E),
> then used Gio-unrelated method to create string with row*col rune grid and pass it to material.Label:
>  https://gitlab.com/viktomas/gritty/-/blob/b9b969635a6d1aee394a9795e55627d36200b998/main.go#L193.

Gio News, August 2023 22 days ago

From Chris Waldon to ~eliasnaur/gio

Hi all,

You can find the latest newsletter describing Gio v0.3.0 here:

https://gioui.org/news/2023-08

Cheers,
Chris