~theclapp

Recent activity

[PATCH] layout: refactor List.Layout and related functions a day 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 14 days 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]

Re: blocking app.Main & integration w/ non-full GUI applications 19 days ago

From Larry Clapp to ~eliasnaur/gio

On Wed, Jun 24, 2020 at 5:46 AM Elias Naur <mail@eliasnaur.com> wrote:
> On Tue Jun 23, 2020 at 08:28, Sebastien Binet wrote:
> > - have a way to programmatically shutdown app.Main
> >
> > what do you think?
> > is this a valid use case for Gioui?
> >
>
> Sure. After implementing the multiple windows feature, I found the unblock
> behaviour of app.Main awkward but didn't have time to rethink it.
>
> You phrase your question as a request for unblocking of app.Main; I think it's
> simpler to remove the magic behaviour of unblocking app.Main when the last
> window is closed, leaving exit control in the hands of the program.

Re: programmatically closing a window 25 days ago

From Larry Clapp to ~eliasnaur/gio

A patch[1] was merged just this morning adding app.Window.Close().
Update to the latest Gio and give that a shot.

-- Larry Clapp

[1] from me! :)

On Thu, Jun 18, 2020 at 4:29 PM Sebastien Binet <s@sbinet.org> wrote:
>
> hi there,
>
> I probably missed something but I didn't figure out a way to programmatically close an *app.Window.
>
> https://play.golang.org/p/kP-E3MV4VS8

[PATCH v3] app,app/internal/window: [macOS] add app.Window.Close for closing a window 26 days ago

From Larry Clapp to ~eliasnaur/gio-patches

Recently support was added for multiple top-level windows. Add support
for closing those windows.

macOS only; all others stubbed out.

Signed-off-by: Larry Clapp <larry@theclapp.org>
---
 app/internal/window/os_android.go |  3 +++
 app/internal/window/os_ios.go     |  3 +++
 app/internal/window/os_js.go      |  3 +++
 app/internal/window/os_macos.go   | 12 ++++++++++++
 app/internal/window/os_macos.m    |  5 +++++
 app/internal/window/os_wayland.go |  3 +++
 app/internal/window/os_windows.go |  3 +++
[message trimmed]

Re: [PATCH v2] app/internal/window,app: [macOS] close a window 26 days ago

From Larry Clapp to ~eliasnaur/gio-patches

All comments addressed in the next version.

On Tue, Jun 16, 2020 at 4:46 AM Elias Naur <mail@eliasnaur.com> wrote:
> Will the other platforms still build when this patch is in?

They should in v3, though everything but macOS is stubbed out.

> (also one space after period)

D'oh!  Sorry, I thought I caught all those.

-- L

Re: [PATCH] pp/window,app/internal/window: Allow max and min window size for macOS 27 days ago

From Larry Clapp to ~eliasnaur/gio-patches

> Any tips on how to make the changes without doing a git reset?

"git commit --amend" is handy.  Usually used to edit a commit message,
you can also use it to update a commit with new changes.

https://git-scm.com/docs/git-commit#Documentation/git-commit.txt---amend

Resending due to error sending to Jason's address; hopefully this one
works better.  The error was:

The response from the remote server was:
554 5.7.1 Mail appears to be unsolicited -- send error reports to
postmaster@sweatyballs.es

Re: [PATCH] pp/window,app/internal/window: Allow max and min window size for macOS 27 days ago

From Larry Clapp to ~eliasnaur/gio-patches

> Any tips on how to make the changes without doing a git reset?

"git commit --amend" is handy.  Usually used to edit a commit message,
you can also use it to update a commit with new changes.

https://git-scm.com/docs/git-commit#Documentation/git-commit.txt---amend


On Tue, Jun 16, 2020 at 2:02 PM Jason <sourcehut@sweatyballs.es> wrote:
>
>
>
> On Tue, 16 Jun, 2020 at 19:50, Elias Naur <mail@eliasnaur.com> wrote:
> > Missing "a" in the subject, use lowercase:

[PATCH v2] app/internal/window,app: [macOS] close a window 28 days ago

From Larry Clapp to ~eliasnaur/gio-patches

Recently support was added for multiple top-level windows.  Add support
for closing those windows.

Signed-off-by: Larry Clapp <larry@theclapp.org>
---
 app/internal/window/os_macos.go | 7 +++++++
 app/internal/window/os_macos.m  | 5 +++++
 app/internal/window/window.go   | 3 +++
 app/window.go                   | 8 ++++++++
 4 files changed, 23 insertions(+)

Change since v1: Removed

  // [window setTabbingMode:2];
[message trimmed]

[PATCH] app/internal/window,app: [macOS] close a window 28 days ago

From Larry Clapp to ~eliasnaur/gio-patches

Recently support was added for multiple top-level windows.  Add support
for closing those windows.

Signed-off-by: Larry Clapp <larry@theclapp.org>
---
 app/internal/window/os_macos.go | 7 +++++++
 app/internal/window/os_macos.m  | 6 ++++++
 app/internal/window/window.go   | 3 +++
 app/window.go                   | 8 ++++++++
 4 files changed, 24 insertions(+)

diff --git a/app/internal/window/os_macos.go b/app/internal/window/os_macos.go
index fef2acd..ca9ed56 100644
--- a/app/internal/window/os_macos.go
[message trimmed]