~theclapp

Recent activity

Re: Re-using Layout 2 days ago

From Larry Clapp to ~eliasnaur/gio

[ Repost, replying to the list too this time. ]

Here's the bit of the pastebin that I think you meant:

    usualLayout := layout.W.Layout(gtx, func(gtx layout.Context)
layout.Dimensions {
        return layout.UniformInset(unit.Dp(8)).Layout(gtx,
material.Editor(th, input, "").Layout)
    })
    if !isNumeric {
        bg := Background{
            Color:  color.RGBA{A: 0xff, R: 255, G: 0, B: 0},
            Radius: unit.Dp(0),
        }

Re: [PATCH gio 0/1] v3 layout: implement list.ScrollTo 26 days ago

From Larry Clapp to ~eliasnaur/gio-patches

All of what Chris says below is true.

Thanks, Chris!

Signed-off-by: Larry Clapp <larry@theclapp.org>

On Fri, Sep 25, 2020 at 10:34 AM ~whereswaldon <whereswaldon@git.sr.ht> wrote:
>
> I've been bugging Larry off and on about this feature for months now,
> and I offered to attempt to synthesize the feedback that Elias provided
> on the last iteration myself. Larry accepted my offer, and here we are.
> The last version of the patch is here:
> https://lists.sr.ht/~eliasnaur/gio-
> patches/%3C20200720130808.48510-1-larry%40theclapp.org%3E#%3CC4QW8FQ0ZFZC.1RVWXDLW3QZGD@testmac%3E

Re: [PATCH] widget: make editor skip words with ctrl key modifier a month ago

From Larry Clapp to ~eliasnaur/gio-patches

Please use ModAlt on Macs.  On my Mac, in Gmail on Chrome, Pages, and
Evernote, for example, Ctrl-Left & Ctrl-Right are
move-to-start-/end-of-line, respectively.  (As is Cmd-Left & -Right,
so you can't use ModShortcut.)  Thanks.

Also: Thanks for this!  Been missing this functionality a lot!

-- Larry

On Tue, Sep 15, 2020 at 9:03 AM Jack Mordaunt <jackmordaunt@gmail.com> wrote:
>
> >From 276298f20ac87c8bdea5126ba6ea0deecee4e396 Mon Sep 17 00:00:00 2001
> From: Jack Mordaunt <jackmordaunt@gmail.com>
> Date: Tue, 15 Sep 2020 20:49:30 +0800

Re: Make checkbox icon modifiable 2 months ago

From Larry Clapp to ~eliasnaur/gio-patches

Could you also just in general make a policy that all Theme fields
should be exported?  It seems to me that it shouldn't ever be
impossible to create your own completely custom theme.

Either that, or instead of a concrete struct, use an interface (or set
of interfaces, of course).

Or conceivably both, where the api uses interfaces but the struct
implements all the appropriate interfaces.

Just my thoughts.

-- Larry

Re: [PATCH] app,app/internal/window,io/system: macOS menus 2 months ago

From Larry Clapp to ~eliasnaur/gio-patches

I took a look at the Fyne code for macOS menus and, broadly speaking,
they take a similar approach: assign each menu item a unique integer
tag, and call a single callback with the tag when the menu item is
chosen.  I don't call a callback, I send an event, but the idea's the
same.

So I'm cautiously optimistic that this approach will work cross-platform.

I haven't actually *used* this code in my app yet, so I'm not sure yet
how to determine which window or event loop should receive the event
(right now it's random), or having gotten it, how to determine what to
do with it after that.  (E.g. for cut/copy/paste events, where
probably some specific widget should process it.)  I actually wanted
this functionality for a "New Window" menu item, and that doesn't care

Re: [PATCH] app,app/internal/window,io/system: macOS menus 2 months ago

From Larry Clapp to ~eliasnaur/gio-patches

This is almost entirely monkey-see-monkey-do with respect to the
Objective-C bits, plus a lot of Googling.  This may or may not be the
best way to do any of this.

-- L

On Wed, Jul 22, 2020 at 12:20 PM Larry Clapp <larry@theclapp.org> wrote:
>
> A strawman interface to the macOS menuing system.
>
> Signed-off-by: Larry Clapp <larry@theclapp.org>
> ---
>  app/app.go                      |  6 +++
>  app/internal/window/os_macos.go | 55 +++++++++++++++++++++++++++

[PATCH] app,app/internal/window,io/system: macOS menus 2 months ago

From Larry Clapp to ~eliasnaur/gio-patches

A strawman interface to the macOS menuing system.

Signed-off-by: Larry Clapp <larry@theclapp.org>
---
 app/app.go                      |  6 +++
 app/internal/window/os_macos.go | 55 +++++++++++++++++++++++++++
 app/internal/window/os_macos.m  | 66 +++++++++++++++++++++++++++++++--
 example/go.mod                  |  4 +-
 example/hello/hello.go          | 12 ++++++
 io/system/system.go             |  6 +++
 6 files changed, 144 insertions(+), 5 deletions(-)

Discussion: This probably isn't good enough for inclusion as-is, but I wanted
to see what y'all thought.
[message trimmed]

[PATCH v2] layout: add List.ScrollTo, ScrollPages, and 2 more 3 months ago

From Larry Clapp to ~eliasnaur/gio-patches

Also add PagePrev & PageNext.

Include tests for all.

Signed-off-by: Larry Clapp <larry@theclapp.org>
---
 layout/list.go      | 118 ++++++++++++++++++++++++--
 layout/list_test.go | 201 ++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 311 insertions(+), 8 deletions(-)
 create mode 100644 layout/list_test.go

diff --git a/layout/list.go b/layout/list.go
index 2375fea..567ef4a 100644
--- a/layout/list.go
[message trimmed]

[PATCH] layout: refactor List.Layout and related functions 3 months ago

From Larry Clapp to ~eliasnaur/gio-patches

I found the interplay of List's Layout/init/next/more/end methods
somewhat confusing and hard to reason about, so I refactored them.

Signed-off-by: Larry Clapp <larry@theclapp.org>
---
 layout/list.go | 31 +++++++++++++------------------
 1 file changed, 13 insertions(+), 18 deletions(-)

diff --git a/layout/list.go b/layout/list.go
index dad83cf..2375fea 100644
--- a/layout/list.go
+++ b/layout/list.go
@@ -30,8 +30,6 @@ type List struct {
	Alignment Alignment
[message trimmed]

[PATCH] layout: add List.ScrollTo, ScrollPages, and 2 more 3 months ago

From Larry Clapp to ~eliasnaur/gio-patches

- Add PagePrev & PageNext
- Simplify List.init, Layout, and end.

Signed-off-by: Larry Clapp <larry@theclapp.org>
---
 layout/list.go | 148 ++++++++++++++++++++++++++++++++++++++++---------
 1 file changed, 121 insertions(+), 27 deletions(-)

Arguably this is v3 of
https://lists.sr.ht/~eliasnaur/gio-patches/%3C20200217205034.23776-1-larry%40theclapp.org%3E
but it's been so long I thought I should start over.

Let me know what you think of the code and I'll work on a test case.
[message trimmed]