~eliasnaur

~eliasnaur/gio-patches

Last active an hour ago

~eliasnaur/gio

Last active 2 days ago

~eliasnaur/test

Last active 1 year, 1 month ago
View more

Recent activity

Re: How make all widgets in list same size? 2 days ago

From Elias Naur to ~eliasnaur/gio

On Mon Oct 19, 2020 at 12:07 AM CEST,  wrote:
> 18 окт. 2020 г., 19:33 От mail@eliasnaur.com:
>
> > I don't have experience answering questions through the other forums you
> > mention; perhaps others on this list do?
> >
> Codidact and TopAnswers is young open source alternatives for StackOverflow.
> I specially mention them only because people that don't want to support Microsoft via Github, could also not want support StackExchange via StackOverflow.
> (Don't get me wrong, I respect such position and also always prefer open source alternative if it's not considerable worse).

FWIW, I chose sourcehut because it's a better match for me as
maintainer. See gioui.org/doc/faq#why-sourcehut.

> GoForum is great but they close any topic after 30 days without activity and it's not very convinient.

Re: [PATCH gio 1/2] shape: add Rect type for drawing filled rectangles 3 days ago

From Elias Naur to ~eliasnaur/gio-patches

On Sun Oct 18, 2020 at 13:16, Chris Waldon wrote:
> > > +//
> > > +func (r Rect) LayoutClipped(gtx layout.Context) layout.Dimensions {
> >
> > Hm, the existence of both Layout and LayoutClipped makes me wonder
> > whether Rect is
> > the right helper. There's already clip.RRect, clip.Rect etc. so perhaps
> > what's missing
> > is really a fill, say paint.FillColor (untested):
>
> Well I agree that having a Fill helper would be nice, but the problem that I
> was hoping to solve with package shape was one of API ergonomics. I need to
> draw rectangles very often, and it's extremely tiresome to first push, then
> clip, then paint them. Drawing a rectangle is a simple operation, and it

Re: How make all widgets in list same size? 3 days ago

From Elias Naur to ~eliasnaur/gio

On Sun Oct 18, 2020 at 16:53,  wrote:
> I have some widgets in list and I want that all of them has equal size. How to do it in Gio?
>

I'm not sure what you mean by equal size. There's

	pixels := gtx.Px(unit.Dp(100))
	gtx.Constraints = layout.Exact(image.Pt(pixels, pixels))

for forcing widgets to take up exactly 100dpx100dp.

> Here is example: https://pastebin.com/T5XyjUdw
> I didn't found answer in examples or in the documentation.
>

Re: [PATCH gio 1/2] shape: add Rect type for drawing filled rectangles 3 days ago

From Elias Naur to ~eliasnaur/gio-patches

On Sat Oct 17, 2020 at 22:12, ~whereswaldon wrote:
> From: Chris Waldon <christopher.waldon.dev@gmail.com>
>
> This is being ported from the materials package, where it was
> already licensed under the unlicense/MIT by Jack and Myself
> in this commit:
>
> https://git.sr.ht/~whereswaldon/materials/commit/f703bf29055d3a599c3f2ca78285083f6c32779d
>
> I've modified it in accordance with Elias' feedback on the
> first patch:
>
> https://lists.sr.ht/~eliasnaur/gio-patches/patches/14339
>

Re: [PATCH v2 1/4] gpu: add transparency support 3 days ago

From Elias Naur to ~eliasnaur/gio-patches

On Sun Oct 18, 2020 at 16:17, Steve Lam wrote:
> On Sunday, October 18, 2020 5:30 AM, Elias Naur <mail@eliasnaur.com> wrote:
>
> > On Sun Oct 18, 2020 at 06:52,  wrote:
> > > From: Steve Lam <steviewc@pm.me>
> > >
> > > ---
> > >  gpu/gpu.go | 32 +++++++++++++++++++++++++-------
> > >  1 file changed, 25 insertions(+), 7 deletions(-)
> > >
> > > diff --git a/gpu/gpu.go b/gpu/gpu.go
> > > index c7a418c..37ef1e8 100644
> > > --- a/gpu/gpu.go
> > > +++ b/gpu/gpu.go

Re: [PATCH gio] shape: add simple utility package for drawing shapes 3 days ago

From Elias Naur to ~eliasnaur/gio-patches

Looks good. Make sure you mention Rect in the commit message. Perhaps also add a use of
Rect in the Gio standard library or in the examples, if for nothing else than to act as
a test.

On Sat Oct 17, 2020 at 22:12, ~whereswaldon wrote:
> From: Chris Waldon <christopher.waldon.dev@gmail.com>
>
> This is being ported from the materials package, where it was
> already licensed under the unlicense/MIT by Jack and Myself
> in this commit:
>
> https://git.sr.ht/~whereswaldon/materials/commit/f703bf29055d3a599c3f2ca78285083f6c32779d
>
> Prior to that, we both contributed to this implementation as

Re: [PATCH v2 3/4] app/internal/d3d11: add transparency support 3 days ago

From Elias Naur to ~eliasnaur/gio-patches

On Sun Oct 18, 2020 at 06:53,  wrote:
> From: Steve Lam <steviewc@pm.me>
>
> ---
>  app/internal/d3d11/backend_windows.go | 138 +++++++++---
>  app/internal/d3d11/d3d11_windows.go   | 313 ++++++++++++++++++++++++--
>  app/internal/window/d3d11_windows.go  |   4 +-
>  3 files changed, 393 insertions(+), 62 deletions(-)
>
> diff --git a/app/internal/d3d11/backend_windows.go b/app/internal/d3d11/backend_windows.go
> index 48ff175..794a267 100644
> --- a/app/internal/d3d11/backend_windows.go
> +++ b/app/internal/d3d11/backend_windows.go
> +func (d *Device) CreateSwapChain(hwnd windows.Handle, transparency bool) (*SwapChain, error) {

Re: [PATCH v2 2/4] app/headless: add transparency support 3 days ago

From Elias Naur to ~eliasnaur/gio-patches

On Sun Oct 18, 2020 at 06:53,  wrote:
> From: Steve Lam <steviewc@pm.me>
>
> ---
>  app/headless/headless.go      | 3 ++-
>  app/headless/headless_test.go | 3 +--
>  2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/app/headless/headless.go b/app/headless/headless.go
> index 6754466..cab0e31 100644
> --- a/app/headless/headless.go
> +++ b/app/headless/headless.go
> @@ -62,7 +63,7 @@ func NewWindow(width, height int) (*Window, error) {
>  			return err

Re: [PATCH v2 1/4] gpu: add transparency support 3 days ago

From Elias Naur to ~eliasnaur/gio-patches

On Sun Oct 18, 2020 at 06:52,  wrote:
> From: Steve Lam <steviewc@pm.me>
>
> ---
>  gpu/gpu.go | 32 +++++++++++++++++++++++++-------
>  1 file changed, 25 insertions(+), 7 deletions(-)
>
> diff --git a/gpu/gpu.go b/gpu/gpu.go
> index c7a418c..37ef1e8 100644
> --- a/gpu/gpu.go
> +++ b/gpu/gpu.go
> @@ -277,12 +290,18 @@ const (
>  	materialTexture
>  )