~eliasnaur

Trackers

~eliasnaur/gio

Last active 22 hours ago

~eliasnaur/scatter

Last active 2 months ago

#92 the text in the flex layout doesn't shows up 22 hours ago

Comment by ~eliasnaur on ~eliasnaur/gio

Please use the mailing list or the #gioui gophers.slack.com channel for support. Thank you.

#92 the text in the flex layout doesn't shows up 2 days ago

Comment by ~eliasnaur on ~eliasnaur/gio

On Fri Mar 27, 2020 at 08:01, ~hussam wrote:

I just modified some simple example on github about GUI I have no any kind of error but I get an empty screen but I expected to see text

func main() {

You need to register a font for text to show up, say

gofont.Register

this is not yet as obvious as I'd like, sorry.

th := material.NewTheme() go func() {

w := app.NewWindow(
      app.Title("textWidget"),
  )
  gtx := layout.NewContext(w.Queue())
  for e := range w.Events() {
      if e, ok := e.(system.FrameEvent); ok {
          gtx.Reset(e.Config, e.Size)

          layout.Flexed(1, func() {

layout.Flexed does nothing by itself, and must always be a child of layout.Flex.Layout.

layout.Flex{Axis: layout.Horizontal}.Layout(gtx,

                  layout.Flexed(0.5, func() {
                      th.H6("content left").Layout(gtx)
                  }),
                  layout.Flexed(0.5, func() {
                      th.H6("content right").Layout(gtx)
                  }),
              )
              e.Frame(gtx.Ops)

You call e.Frame inside a layout operations. The call to e.Frame should always be the very last thing you do.

})
      }
  }

}()

app.Main() }

The working program:

package main

import (
    "gioui.org/app"
    "gioui.org/font/gofont"
    "gioui.org/io/system"
    "gioui.org/layout"
    "gioui.org/widget/material"
)

func main() {
    gofont.Register()
    th := material.NewTheme()
    go func() {

        w := app.NewWindow(
            app.Title("textWidget"),
        )
        gtx := layout.NewContext(w.Queue())
        for e := range w.Events() {
            if e, ok := e.(system.FrameEvent); ok {
                gtx.Reset(e.Config, e.Size)

                layout.Flex{Axis: layout.Horizontal}.Layout(gtx,
                    layout.Flexed(0.5, func() {
                        th.H6("content left").Layout(gtx)
                    }),
                    layout.Flexed(0.5, func() {
                        th.H6("content right").Layout(gtx)
                    }),
                )
                e.Frame(gtx.Ops)
            }
        }
    }()

    app.Main()
}

REPORTED RESOLVED INVALID

#91 Doesn't compile on wayland-only host 6 days ago

on ~eliasnaur/gio

REPORTED RESOLVED FIXED

#91 Doesn't compile on wayland-only host 6 days ago

Comment by ~eliasnaur on ~eliasnaur/gio

On Mon Mar 23, 2020 at 10:04, Andri Yngvason wrote:

mán., 23. mar. 2020 kl. 09:53 skrifaði ~eliasnaur outgoing@sr.ht:

On Mon Mar 23, 2020 at 09:14, Andri Yngvason wrote:

This worked, but now this gets in the way:

gioui.org/app/internal/window

x86_64-buildroot-linux-gnu-gcc: ERROR: unsafe header/library path used in cross- compilation: '-I/usr/include/wayland'

If the include path is prefixed with =, all is good: -I=/usr/include/wayland.

Thank you for teaching me about '='. I prefixed all include

paths in the change No problem. I recommend doing the same with LDFLAGS.

I gave up on the prefixing and switched to using pkg-config on Linux. See

https://git.sr.ht/~eliasnaur/gio/commit/38ed6d1569354ad5b6b027bb357798dcde90f7ec

I hope that'll reduce the headache of supporting different build environments and linuxes.

Let me know.

#91 Doesn't compile on wayland-only host 6 days ago

Comment by ~eliasnaur on ~eliasnaur/gio

On Mon Mar 23, 2020 at 09:14, Andri Yngvason wrote:

This worked, but now this gets in the way:

gioui.org/app/internal/window x86_64-buildroot-linux-gnu-gcc: ERROR: unsafe header/library path used in cross-compilation: '-I/usr/include/wayland'

If the include path is prefixed with =, all is good: -I=/usr/include/wayland.

Thank you for teaching me about '='. I prefixed all include paths in the change

https://git.sr.ht/~eliasnaur/gio/commit/e4f5b6864ac2dc9add8086544fc1fc70ed789530

Let me know how it fares.

BTW, can I close this issue over email?

I believe so: https://man.sr.ht/todo.sr.ht/#email-access.

#91 Doesn't compile on wayland-only host 8 days ago

Comment by ~eliasnaur on ~eliasnaur/gio

On Fri Mar 20, 2020 at 19:43, Andri Yngvason wrote:

fös., 20. mar. 2020 kl. 18:15 skrifaði ~eliasnaur outgoing@sr.ht:

Please attach your command and the resulting error emssage. Did you

specify the nox11 tag when building? If not, I'm suprised the Mesa

flag works. If you did, would you consider preparing a patch for adding

the flag to the Wayland backend?

Well, I'm building gio as a vendor module in a project in buildroot. The command that buildroot uses to build the project is this: ``` cd /home/andri/vinna/buildroot/output/build/backup- gui-187c33b6ca3b5b27bdc977439850b039f1c1fce6; GO111MODULE=on GOARCH=amd64

GOCACHE=/home/andri/vinna/buildroot/output/host/usr/share/go-cache

GOPROXY=off GOROOT=/home/andri/vinna/buildroot/output/host/lib/go

GOPATH=/home/andri/vinna/buildroot/dl/go-module

CC=/home/andri/vinna/buildroot/output/host/bin/x86_64-buildroot-linux- gnu-gcc

CXX=/home/andri/vinna/buildroot/output/host/bin/x86_64-buildroot-linux- gnu-g++ GOTOOLDIR=/home/andri/vinna/buildroot/output/host/lib/go/pkg/ tool/linux_amd64 PATH=/home/andri/vinna/buildroot/output/host/bin:/ho me/andri/vinna/buildroot/output/host/sbin:/home/andri/.gem/ruby/2.7.0/bi n:/home/andri/.bin:/opt/sway/bin:/usr/local/sbin:/usr/local/bin:/usr/bin :/usr/bin/siteperl:/usr/bin/vendorperl:/usr/bin/core_perl GOBIN= CGO_ENABLED=1 /home/andri/vinna/buildroot/output/host/bin/go build -v -ldflags "-mod=vendor -tagsnox11" -p 9 -o

/home/andri/vinna/buildroot/output/build/backup- gui-187c33b6ca3b5b27bdc977439850b039f1c1fce6/bin/backup-gui . ```

Thanks. With the nox11 tag the error makes sense to me. Please see whether

https://git.sr.ht/~eliasnaur/gio/commit/a3101c9454b7451c0e3959820d6d2e1b409d2e63

fixes the problem in your buildroot (I tested it by manually removing /usr/include/X11). If so, please close this issue.

#91 Doesn't compile on wayland-only host 8 days ago

Comment by ~eliasnaur on ~eliasnaur/gio

Please attach your command and the resulting error emssage. Did you specify the nox11 tag when building? If not, I'm suprised the Mesa flag works. If you did, would you consider preparing a patch for adding the flag to the Wayland backend?

#43 Button with icons and text support 12 days ago

Comment by ~eliasnaur on ~eliasnaur/gio

On Mon Mar 16, 2020 at 10:16 PM, ~metaclips wrote:

I honestly do not know what I'm doing wrong. Here's my command git send-email --to=~eliasnaur/gio-patches@lists.sr.ht --cc=mail@eliasnaur.com HEAD^ saved and sent mail with Result: OK

OK. Log says: Sendmail: /usr/sbin/sendmail -i ~eliasnaur/gio- patches@lists.sr.ht mail@eliasnaur.com utimichael9@gmail.com

You're using your system's local sendmail. Is it configured to send mail through an email provider or for self-hosted SMTP? If not, follow step #2 from

https://git-send-email.io/#step-2

to set it up.

However, you can also fork the Gio project to your own git.sr.ht account and send the patch from the button on the front page of your fork.

-- elias

#43 Button with icons and text support 12 days ago

Comment by ~eliasnaur on ~eliasnaur/gio

I haven't seen the patch, to the list nor to mail@eliasnaur.com. I don't know what's going wrong.

#43 Button with icons and text support 13 days ago

Comment by ~eliasnaur on ~eliasnaur/gio

On Sun Mar 15, 2020 at 23:04, ~metaclips wrote:

Hello, I made a PR that adds icon with text support. Wanted to know if you got it.

I didn't, or I missed it. Can you please re-send to gio-patches@lists.sr.ht and CC me at mail@eliasnaur.com?

-- elias