diff --git a/doc/cookbook/examples/script-ui.json b/doc/cookbook/examples/script-ui.json index 83b145193..d7b8f9a13 100644 --- a/doc/cookbook/examples/script-ui.json +++ b/doc/cookbook/examples/script-ui.json @@ -16,8 +16,8 @@ "layout-manager" : { "type" : "ClutterBinLayout", - "x-align" : "CLUTTER_BIN_ALIGNMENT_CENTER", - "y-align" : "CLUTTER_BIN_ALIGNMENT_CENTER" + "x-align" : "center", + "y-align" : "center" }, "children" : [ diff --git a/doc/cookbook/script.xml b/doc/cookbook/script.xml index f15d6b8c8..690f57028 100644 --- a/doc/cookbook/script.xml +++ b/doc/cookbook/script.xml @@ -108,8 +108,8 @@ "layout-manager" : { "type" : "ClutterBinLayout", - "x-align" : "CLUTTER_BIN_ALIGNMENT_CENTER", - "y-align" : "CLUTTER_BIN_ALIGNMENT_CENTER" + "x-align" : "center", + "y-align" : "center" }, "children" : [ @@ -175,6 +175,29 @@ within the list. The two can be mixed in a single list of children. + + This uses the nickname for a value in an enumeration + (in this case, the nickname for + CLUTTER_BIN_ALIGNMENT_CENTER). + To get the nickname for an enumeration value, take + the component which is unique to that value in the + enumeration, lowercase it, and replace any underscores + with hyphens. Some examples: + + + CLUTTER_ALIGN_X_AXIS has + the nickname x-axis + + + CLUTTER_GRAVITY_NORTH has + the nickname north + + + CLUTTER_REQUEST_HEIGHT_FOR_WIDTH + has the nickname height-for-width + + +