docs: Clarify when to replace old boxes with Grid
Mention that GtkGrid should only replace grid-like layouts achieved with nested boxes. Additionally, remove any mention of "future proofing": boxes are not going away.
This commit is contained in:
parent
759ee31b0c
commit
d1936c1ae3
@ -50,10 +50,11 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
|||||||
* from #GtkBox. No further changes are needed, since the default
|
* from #GtkBox. No further changes are needed, since the default
|
||||||
* value of the #GtkOrientable:orientation property is
|
* value of the #GtkOrientable:orientation property is
|
||||||
* %GTK_ORIENTATION_HORIZONTAL.
|
* %GTK_ORIENTATION_HORIZONTAL.
|
||||||
* If you don’t need first-child or last-child styling, and want your code
|
*
|
||||||
* to be future-proof, the recommendation is to switch to #GtkGrid instead
|
* If you have a grid-like layout composed of nested boxes, and you don’t
|
||||||
* of nested boxes. For more information about migrating to #GtkGrid,
|
* need first-child or last-child styling, the recommendation is to switch
|
||||||
* see [Migrating from other containers to GtkGrid][gtk-migrating-GtkGrid].
|
* to #GtkGrid. For more information about migrating to #GtkGrid, see
|
||||||
|
* [Migrating from other containers to GtkGrid][gtk-migrating-GtkGrid].
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@ -45,20 +45,24 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
|||||||
*
|
*
|
||||||
* All children are allocated the same width.
|
* All children are allocated the same width.
|
||||||
*
|
*
|
||||||
* GtkVBox has been deprecated. You can use #GtkBox instead, which is a
|
* GtkVBox has been deprecated. You can use #GtkBox with a #GtkOrientable:orientation
|
||||||
* very quick and easy change. If you have derived your own classes from
|
* set to %GTK_ORIENTATION_VERTICAL instead when calling gtk_box_new(),
|
||||||
* GtkVBox, you can simply change the inheritance to derive directly
|
* which is a very quick and easy change.
|
||||||
* from #GtkBox, and set the #GtkOrientable:orientation property to
|
*
|
||||||
* %GTK_ORIENTATION_VERTICAL in your instance init function, with a
|
* If you have derived your own classes from GtkVBox, you can change the
|
||||||
* call like:
|
* inheritance to derive directly from #GtkBox, and set the #GtkOrientable:orientation
|
||||||
|
* property to %GTK_ORIENTATION_VERTICAL in your instance init function,
|
||||||
|
* with a call like:
|
||||||
|
*
|
||||||
* |[<!-- language="C" -->
|
* |[<!-- language="C" -->
|
||||||
* gtk_orientable_set_orientation (GTK_ORIENTABLE (object),
|
* gtk_orientable_set_orientation (GTK_ORIENTABLE (object),
|
||||||
* GTK_ORIENTATION_VERTICAL);
|
* GTK_ORIENTATION_VERTICAL);
|
||||||
* ]|
|
* ]|
|
||||||
* If you don’t need first-child or last-child styling and want your code
|
*
|
||||||
* to be future-proof, the recommendation is to switch to #GtkGrid instead
|
* If you have a grid-like layout composed of nested boxes, and you don’t
|
||||||
* of nested boxes. For more information about migrating to #GtkGrid,
|
* need first-child or last-child styling, the recommendation is to switch
|
||||||
* see [Migrating from other containers to GtkGrid][gtk-migrating-GtkGrid].
|
* to #GtkGrid. For more information about migrating to #GtkGrid, see
|
||||||
|
* [Migrating from other containers to GtkGrid][gtk-migrating-GtkGrid].
|
||||||
*/
|
*/
|
||||||
|
|
||||||
G_DEFINE_TYPE (GtkVBox, gtk_vbox, GTK_TYPE_BOX)
|
G_DEFINE_TYPE (GtkVBox, gtk_vbox, GTK_TYPE_BOX)
|
||||||
|
Loading…
Reference in New Issue
Block a user