Comments (3)
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.
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.
Created issue #36 to trackthe
MenuButton
changes.
from gotk4.
Related Issues (20)
- Stuck on "Login to gtkcord3" HOT 2
- Stuck at "go get github.com/diamondburned/gotk4/pkg/gtk/v4" HOT 1
- [xcb] Unknown sequence number while processing queue HOT 6
- Cant connect gtkBuilder signals HOT 6
- Rename pkg/core/glib to pkg/core/gcore
- Generate thread-safe check guards for GTK
- Support GWeakRef
- Add GOTK4_DEBUG
- Emptying Listbox: ListBox.Remove() yells "Warning: Gtk: Tried to remove non-child" on removing its children HOT 2
- Proposal: Runtime dynamic linking HOT 10
- Consider adding a Blueprint example HOT 3
- Consider adding an example of Popup Menu HOT 2
- go1.18 - go4.org/unsafe/assume-no-moving-gc HOT 1
- MSYS2 - conflicting types for 'callbackDelete' HOT 2
- How to load GTK themes HOT 1
- gio.Settings is missing constructors `new_full`, `new_with_backend` and `new_with_backend_and_path` HOT 3
- Dockerfile doesn't build HOT 2
- Proposal: Object.Destroy()
- Freeze after dragging text from entry HOT 1
- ListBox BindModel example?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gotk4.