~jzs

Denmark

https://www.sketchground.dk

Writing code

~jzs/public-inbox

Last active 6 months ago
View more

Recent activity

Re: Pinephone and cross compiling for pmos/arm64 a month ago

From Jens Zeilund to ~eliasnaur/gio

On Sat Dec 19, 2020 at 6:17 PM CET, Tanguy Herrmann wrote:
> How come the GPU would not be supported by Gio?
> Wouldn't the GPU driver make OpenGL works, and therefore, Gio with it?
> And since it seems Pinephone can display 3d with OpenGL, What could be
> the problem?
>

It's due to pinephone not supporting opengl es 3 or GL_EXT_sRGB
primarily. Not sure it does half floats either. I can give you the exact
error message later if you're interested.

- Jens.

> 19 déc. 2020 16:37:23 Elias Naur <mail@eliasnaur.com>:

Pinephone and cross compiling for pmos/arm64 a month ago

From Jens Zeilund to ~eliasnaur/gio

Hi all,

I was doing some experiments with gio on pinephone without any luck. It simply 
doesn't seem to be supported by gio currently. (Oh i wish i would be able to 
run gio apps on my pinephone :) )

However while experimenting with this i also configured a docker container to 
compile arm64 binaries for postmarketos which might come in handy for some of 
you, so here it is:


I just wanted to share this with you in case you want to cross compile gio apps
for postmarketos for arm64. This assumes linux as your host os, but it might 
also be able to do it on osx.

[PATCH] Do not import errors if not used 2 months ago

From Jens Zeilund to ~sircmpwn/public-inbox

---
 cmd/gen/main.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cmd/gen/main.go b/cmd/gen/main.go
index 9d2e106..863e514 100644
--- a/cmd/gen/main.go
+++ b/cmd/gen/main.go
@@ -21,7 +21,7 @@ package {{.package}}
// Code generated by go-bare/cmd/gen, DO NOT EDIT.

import (
	"errors"
	{{- if .schema.Enums}}"errors"{{end}}
[message trimmed]

Re: Centering text in stack layout 1 year, 12 days ago

From jzs to ~eliasnaur/gio

>
> the transparent blue rectangle is centered to me. The 'a' horizontally centered
> but not vertically centered because the text bounds reported by Label.Layout is
> from the font size, not the "tight" size of the particular text. To see why this
> matters, try a tall character such as "Å", or a letter with a descent such as
> "j".
>
> -- elias

Thank you very much for the explanation. It is the size calculation in label that
had me tricked. I will live with big letters for now.

And thank you for a great project! I hope i can contribute to the project in the
future.

Re: Centering text in stack layout 1 year, 12 days ago

From jzs to ~eliasnaur/gio

> What happens if you center this section like this:
>
> layout.Align(layout.Center).Layout(gtx, func() {
> lbl := theme.Label(unit.Dp(32), "a")
> lbl.Layout(gtx)
> })
>
> ?

Unfortunately it gives the same result. The result is that the upper left
corner of the text is placed in the center.
What i'm trying to achieve is that the center of the text is at the center of
the stack layout.

Centering text in stack layout 1 year, 12 days ago

From jzs to ~eliasnaur/gio

Hi All,

I'm having trouble properly centering text in a Stack layout. I'm
trying to create a circle with one letter centered inside the circle,
however it seems as if the text itself is not centered.

Here's a gist of the full example:
https://gist.github.com/jzs/addaa1ca2a280c33f10e82660ee3037b

And here's the actual drawing part:

size := 100
gtx.Constraints.Height.Min = size
gtx.Constraints.Width.Min = size