~whereswaldon/gio-x

component: fix context area eating clicks

The PassOp on the ContextArea was incorrectly set after
creating the click area. This prevented underlying widget
hit areas from receiving events.

Signed-off-by: Chris Waldon <christopher.waldon.dev@gmail.com>
component(modal): only lay out modal content after animation

Signed-off-by: Chris Waldon <christopher.waldon.dev@gmail.com>
component: introduce modernised modal api

`component.Modal` was structured to be retained mode.
This patch attempts to modernize it by splitting apart state and style.

Keep old types around for temporary compatibility.

Usage is something like this:

```go
// Allocate the necessary state.
var (
  th *material.Theme
  modal component.ModalState
  showModal widget.Clickable
)

func layoutUI(gtx C) D {
  // In response to some action, activate the modal by assigning a
  // content widget.
  if showModal.Clicked() {
    modal.Show(gtx.Now, func(gtx C) D {
      return layoutFoo(gtx)
    })
  }
  // Stack modal on top of the UI.
  // Modal is a noop if no content widget is specified.
  return layout.Stack{}.Layout(gtx,
    layout.Stacked(func(gtx C) D {
      return layoutContent(gtx)
    }),
    layout.Expanded(func(gtx C) D {
      return component.Modal(th, &modal).Layout(gtx)
    }),
  )
}
```

Signed-off-by: Jack Mordaunt <jackmordaunt.dev@gmail.com>
scroll: remove scroll package

The scrollbar is now available in core using the material.List
type. It no longer needs to exist here.

Signed-off-by: Chris Waldon <christopher.waldon.dev@gmail.com>
deps,component: update to latest gio

Required changing how we use widget.Icon to set the dimensions
via constraints instead of an explicit parameter.

Signed-off-by: Chris Waldon <christopher.waldon.dev@gmail.com>
richtext: separate persistent state from style

This commit separates the interaction state of text from the
presentation state. This allows applications to persist only
the interaction state across frames (lower memory footprint).

This commit also (as a byproduct of this separation) also
adds support for detecting hovers and long-presses on
interactive text.

Signed-off-by: Chris Waldon <christopher.waldon.dev@gmail.com>
98819c83 — Jack Mordaunt 2 months ago
component: expose absolute progress value

Signed-off-by: Jack Mordaunt <jackmordaunt@gmail.com>
052a5abb — Jack Mordaunt 2 months ago
component: fmt long line

Signed-off-by: Jack Mordaunt <jackmordaunt@gmail.com>
component: fix spelling of Invalidate

Signed-off-by: Chris Waldon <christopher.waldon.dev@gmail.com>
richtext: create DeepCopy method for TextObject
This makes it possible to copy TextObjects without them sharing
a backing metadata map.

Signed-off-by: Chris Waldon <christopher.waldon.dev@gmail.com>
doc: update link contents

Signed-off-by: Chris Waldon <christopher.waldon.dev@gmail.com>
aa3442e7 — ghost08 2 months ago
richtext: add richtext package

Signed-off-by: ghost08 <magyarv@protonmail.com>
component: document tooltip in README

Signed-off-by: Chris Waldon <christopher.waldon.dev@gmail.com>
component: document and refactor tooltip types

Signed-off-by: Chris Waldon <christopher.waldon.dev@gmail.com>
component: add tooltip iconbutton wrapper

Signed-off-by: Chris Waldon <christopher.waldon.dev@gmail.com>
component: fix tooltip delayed animation

This commit updates the animation code for the TipArea to
minimize the number of screen invalidations required to
animate the appearance of the contextual content. In the
process, this commit fixes some bugs with the TipArea.

Signed-off-by: Chris Waldon <christopher.waldon.dev@gmail.com>
component: add TipArea for displaying tooltips

Signed-off-by: Chris Waldon <christopher.waldon.dev@gmail.com>
component: implement tooltip component visually

This commit introduces a pre-styled tooltip component. It does not
include logic for displaying tooltips on hover or other interactions.

Signed-off-by: Chris Waldon <christopher.waldon.dev@gmail.com>
component: fixed flickering when w1 is approaching zero size in some circumstances in Resize

Signed-off-by: pierre <pierre.curto@gmail.com>
Signed-off-by: pierre <pierre.curto@gmail.com>
Next