Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-swt-dev] ZERO_SIZED Widgets on GTK?

I see. Thanks for pointing it out. 

I noticed there are some bugs with Zero sized widgets in gtk3.8+ if they are sized before shown or laid out. (ex setBounds(0,0) called before layout()). 

May be related to this guy:
Bug 465280 - [GTK3] OS.gtk_widget_get_allocation returns (0,0) for invisible controls

I'll hunt around.

Thank you



On Mon, Jun 6, 2016 at 10:41 AM, Stefan Xenos <sxenos@xxxxxxxxxx> wrote:

SWT doesn't support zero-sized widgets very well - they often have their size increased to some minimum instead of getting 0 size.

However, there is a valid use-case for zero-sized widgets: namely, dealing with degenerate layout cases. When there is insufficient space for a layout, some widgets often get truncated or set to 0 size by their parent layout. The expected user-visible behavior in such cases is for the widget to behave essentially as though it were hidden. When SWT imposes a minimum size, the widget ends up overlapping it's neighbors, which is bad.


On Mon, Jun 6, 2016, 6:48 AM Leo Ufimtsev <lufimtse@xxxxxxxxxx> wrote:
Hello, 

In SWT Gtk 2, there's been a hack introduced in 2003 to deal with Zero sized widgets (ZERO_WIDTH, ZERO_HEIGHT). 

But since Gtk3.8 Zero size widgets pose a bit of an issue since hidden widgets also return a 0x0 creating some ambiguity and sizing issues.

Is there any actual use case for zero sized widgets as oppose to just hiding them? I.e does SWT support zero sized widgets and is there anyone actually using zero sized widgets instead of hiding them?

If not, then in the interest of architecture hygiene it may make sense to remove them?

--
Leo Ufimtsev | Software Engineer @ Red Hat
_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev

_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev



--
Leo Ufimtsev | Software Engineer @ Red Hat

Back to the top