gtk properties can only have one argument using attributes
Not sure if there is an easy fix to this, but I was trying to set the policy on a scrolled window. It requires the policy for the horizontal and vertical scrollbar, but you can only pass one argument.
gtk::ScrolledWindow {
policy: (gtk::PolicyType::Never, gtk::PolicyType::Automatic),
edit: realized afterwords there is a separate vscrollbar and hscrollbar policy, but this might still be relevant for other properties.
Yeah, multiple value properties are not supported. You have 2 alternatives:
- Either try with hscroll_policy and vscroll_policy.
- Or use the
init_view()method to callset_policy.
If there are other properties like that, please tell me and I'll fix that on a case-by-case basis (perhaps even in gtk-rs itself).
hscroll_policy is working. If I find any others I'll report here. Thanks
Is this the same thing as trying to do set_size_request?
@superlou: For that, there's property_height_request.
That works, thanks.
What about Image.set_from_icon_name? init_view method works, but setting from macro would be much nicer.
Hey, init_view() is a bit inconvenient, so I'd like to add support for this. Any suggestions on how I can contribute? I sifted through the code but can't seem to find the view macro anywhere, could use some help navigating.