Giter Site home page Giter Site logo

Comments (3)

sqp avatar sqp commented on June 4, 2024 1

For the gtk.MenuButton the name conflict could be resolved by renaming :

  • Direction -> MenuDirection
  • SetDirection -> SetMenuDirection
    (or Arrow instead of Menu as the argument is an ArrowType but I think a MenuDirection method is fine for a MenuButton)

It would be easier to have the widget behave like the others and be usable directly as Widgetter.

Their documentation:

Direction returns the direction the popup will be pointing at when popped up.

SetDirection sets the direction in which the popup will be popped up.
If the button is automatically populated with an arrow icon, its direction will be changed to match.
If the does not fit in the available space in the given direction, GTK will its best to keep it inside the screen and fully visible.
If you pass GTK_ARROW_NONE for a direction, the popup will behave as if you passed GTK_ARROW_DOWN (although you won’t see any arrows).

from gotk4.

diamondburned avatar diamondburned commented on June 4, 2024

For some widgets, you might need to explicitly reference the field, such as with
adw.Avatar:

box.Append(&adw.Widget)

There's not really a way around this other than to autogenerate more fields into
the class struct. In fact, this is already done with classes that potentially
yield ambiguous selectors for glib.Objector:

type Widget struct {
	externglib.InitiallyUnowned

	Accessible
	Buildable
	ConstraintTarget
	*externglib.Object // extra field
}

Having to do this for all possible interfaces is a lot of work and potentially a
lot of unnecessary overhead, though, so I've decided not to go all the way.

gopls should suggest you the right selector when you try to plug the widget
in.

from gotk4.

diamondburned avatar diamondburned commented on June 4, 2024

Created issue #36 to trackthe
MenuButton changes.

from gotk4.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.