diff --git a/demos/gtk-demo/builder.c b/demos/gtk-demo/builder.c index 22c06dfa72..082632204a 100644 --- a/demos/gtk-demo/builder.c +++ b/demos/gtk-demo/builder.c @@ -1,5 +1,5 @@ /* Builder - * #Keywords: GMenu, GtkPopoverMenuBar, GtkBuilder, GtkStatusBar, toolbar + * #Keywords: GMenu, GtkPopoverMenuBar, GtkBuilder, GtkStatusBar, GtkShortcutController, toolbar * * Demonstrates a traditional interface, loaded from a XML description, * and shows how to connect actions to the menu items and toolbar buttons. diff --git a/demos/gtk-demo/constraints.ui b/demos/gtk-demo/constraints.ui deleted file mode 100644 index 1766f931c7..0000000000 --- a/demos/gtk-demo/constraints.ui +++ /dev/null @@ -1,106 +0,0 @@ - - - - Constraints — Builder - 260 - - - - - - - - - - - - - - - - - - - - - - - - - - - Child 1 - - - - - Child 2 - - - - - Child 3 - - - - - - diff --git a/demos/gtk-demo/constraints4.c b/demos/gtk-demo/constraints_builder.c similarity index 80% rename from demos/gtk-demo/constraints4.c rename to demos/gtk-demo/constraints_builder.c index 4b4ca49643..5d8b6a9413 100644 --- a/demos/gtk-demo/constraints4.c +++ b/demos/gtk-demo/constraints_builder.c @@ -1,8 +1,10 @@ /* Constraints/Builder * - * GtkConstraintLayouts can be created in .ui files, and constraints can be - * set up at that time as well, as this example demonstrates. It uses the - * same setup as the “Simple” constraints demo. + * GtkConstraintLayouts can be created in .ui files, and constraints can + * be set up at that time as well, as this example demonstrates. It shows + * various ways to do spacing and sizing with constraints. + * + * Make the window wider to see the rows react differently */ #include @@ -43,7 +45,7 @@ constraints_grid_class_init (ConstraintsGridClass *klass) } GtkWidget * -do_constraints4 (GtkWidget *do_widget) +do_constraints_builder (GtkWidget *do_widget) { static GtkWidget *window; @@ -53,7 +55,7 @@ do_constraints4 (GtkWidget *do_widget) g_type_ensure (constraints_grid_get_type ()); - builder = gtk_builder_new_from_resource ("/constraints4/constraints.ui"); + builder = gtk_builder_new_from_resource ("/constraints_builder/constraints_builder.ui"); window = GTK_WIDGET (gtk_builder_get_object (builder, "window1")); gtk_window_set_display (GTK_WINDOW (window), diff --git a/demos/gtk-demo/constraints_builder.ui b/demos/gtk-demo/constraints_builder.ui new file mode 100644 index 0000000000..c5748e7f42 --- /dev/null +++ b/demos/gtk-demo/constraints_builder.ui @@ -0,0 +1,460 @@ + + + + Constraints — Builder + 260 + + + fill + fill + 10 + 10 + 10 + 10 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A + + + + + B + + + + + C + + + + + A + + + + + B + + + + + C + + + + + A + + + + + B + + + + + C + + + + + A + + + + + B + + + + + C + + + + + A + + + + + B + + + + + C + + + + + + diff --git a/demos/gtk-demo/constraints2.c b/demos/gtk-demo/constraints_interactive.c similarity index 99% rename from demos/gtk-demo/constraints2.c rename to demos/gtk-demo/constraints_interactive.c index 782ade175b..90262552f6 100644 --- a/demos/gtk-demo/constraints2.c +++ b/demos/gtk-demo/constraints_interactive.c @@ -205,7 +205,7 @@ interactive_grid_init (InteractiveGrid *self) } GtkWidget * -do_constraints2 (GtkWidget *do_widget) +do_constraints_interactive (GtkWidget *do_widget) { static GtkWidget *window; diff --git a/demos/gtk-demo/constraints3.c b/demos/gtk-demo/constraints_vfl.c similarity index 99% rename from demos/gtk-demo/constraints3.c rename to demos/gtk-demo/constraints_vfl.c index b0d15dc2ac..08016f0b48 100644 --- a/demos/gtk-demo/constraints3.c +++ b/demos/gtk-demo/constraints_vfl.c @@ -128,7 +128,7 @@ vfl_grid_init (VflGrid *self) } GtkWidget * -do_constraints3 (GtkWidget *do_widget) +do_constraints_vfl (GtkWidget *do_widget) { static GtkWidget *window; diff --git a/demos/gtk-demo/demo.gresource.xml b/demos/gtk-demo/demo.gresource.xml index 72933ebef6..a0ccb783d9 100644 --- a/demos/gtk-demo/demo.gresource.xml +++ b/demos/gtk-demo/demo.gresource.xml @@ -18,8 +18,8 @@ demoimage.c demoimage.h - - constraints.ui + + constraints_builder.ui css_accordion.css @@ -253,9 +253,9 @@ clipboard.c combobox.c constraints.c - constraints2.c - constraints3.c - constraints4.c + constraints_interactive.c + constraints_vfl.c + constraints_builder.c css_accordion.c css_basics.c css_blendmodes.c @@ -294,7 +294,7 @@ layoutmanager2.c links.c listbox.c - listbox2.c + listbox_controls.c listview_applauncher.c listview_colors.c listview_clocks.c @@ -309,7 +309,7 @@ markup.c menu.c overlay.c - overlay2.c + overlay_decorative.c paint.c pagesetup.c paintable.c @@ -359,8 +359,8 @@ messages.txt apple-red.png - - listbox2.ui + + listbox_controls.ui glarea-gl.fs.glsl diff --git a/demos/gtk-demo/listbox2.c b/demos/gtk-demo/listbox_controls.c similarity index 94% rename from demos/gtk-demo/listbox2.c rename to demos/gtk-demo/listbox_controls.c index 17a79df741..5a72622d22 100644 --- a/demos/gtk-demo/listbox2.c +++ b/demos/gtk-demo/listbox_controls.c @@ -34,7 +34,7 @@ row_activated (GtkListBox *list, } GtkWidget * -do_listbox2 (GtkWidget *do_widget) +do_listbox_controls (GtkWidget *do_widget) { if (!window) { @@ -47,7 +47,7 @@ do_listbox2 (GtkWidget *do_widget) builder = gtk_builder_new (); gtk_builder_set_scope (builder, scope); - gtk_builder_add_from_resource (builder, "/listbox2/listbox2.ui", NULL); + gtk_builder_add_from_resource (builder, "/listbox_controls/listbox_controls.ui", NULL); window = GTK_WIDGET (gtk_builder_get_object (builder, "window")); gtk_window_set_display (GTK_WINDOW (window), diff --git a/demos/gtk-demo/listbox2.ui b/demos/gtk-demo/listbox_controls.ui similarity index 100% rename from demos/gtk-demo/listbox2.ui rename to demos/gtk-demo/listbox_controls.ui diff --git a/demos/gtk-demo/meson.build b/demos/gtk-demo/meson.build index 93a78c9fca..9076c05383 100644 --- a/demos/gtk-demo/meson.build +++ b/demos/gtk-demo/meson.build @@ -7,9 +7,9 @@ demos = files([ 'clipboard.c', 'combobox.c', 'constraints.c', - 'constraints2.c', - 'constraints3.c', - 'constraints4.c', + 'constraints_interactive.c', + 'constraints_vfl.c', + 'constraints_builder.c', 'css_accordion.c', 'css_basics.c', 'css_blendmodes.c', @@ -44,7 +44,7 @@ demos = files([ 'layoutmanager2.c', 'links.c', 'listbox.c', - 'listbox2.c', + 'listbox_controls.c', 'menu.c', 'flowbox.c', 'list_store.c', @@ -60,7 +60,7 @@ demos = files([ 'listview_words.c', 'markup.c', 'overlay.c', - 'overlay2.c', + 'overlay_decorative.c', 'paint.c', 'paintable.c', 'paintable_animated.c', diff --git a/demos/gtk-demo/overlay2.c b/demos/gtk-demo/overlay_decorative.c similarity index 98% rename from demos/gtk-demo/overlay2.c rename to demos/gtk-demo/overlay_decorative.c index 11f2e2a243..8306f52fb1 100644 --- a/demos/gtk-demo/overlay2.c +++ b/demos/gtk-demo/overlay_decorative.c @@ -21,7 +21,7 @@ margin_changed (GtkAdjustment *adjustment, } GtkWidget * -do_overlay2 (GtkWidget *do_widget) +do_overlay_decorative (GtkWidget *do_widget) { static GtkWidget *window = NULL; diff --git a/demos/gtk-demo/sliding_puzzle.c b/demos/gtk-demo/sliding_puzzle.c index 4d7e23f908..1af4e2b48a 100644 --- a/demos/gtk-demo/sliding_puzzle.c +++ b/demos/gtk-demo/sliding_puzzle.c @@ -1,5 +1,5 @@ /* Sliding Puzzle - * #Keywords: GdkPaintable, GdkGesture, game + * #Keywords: GdkPaintable, GdkGesture, GtkShortcutController, game * * This demo demonstrates how to use gestures and paintables to create a * small sliding puzzle game. @@ -281,7 +281,8 @@ start_puzzle (GdkPaintable *paintable) gtk_aspect_frame_set_obey_child (GTK_ASPECT_FRAME (frame), FALSE); /* Add shortcuts so people can use the arrow - * keys to move the puzzle */ + * keys to move the puzzle + */ controller = gtk_shortcut_controller_new (); gtk_shortcut_controller_set_scope (GTK_SHORTCUT_CONTROLLER (controller), GTK_SHORTCUT_SCOPE_LOCAL); diff --git a/gtk/gtkenums.h b/gtk/gtkenums.h index d3b6b3e6b2..761db8a538 100644 --- a/gtk/gtkenums.h +++ b/gtk/gtkenums.h @@ -196,13 +196,13 @@ typedef enum /** * GtkSensitivityType: - * @GTK_SENSITIVITY_AUTO: The arrow is made insensitive if the - * thumb is at the end - * @GTK_SENSITIVITY_ON: The arrow is always sensitive - * @GTK_SENSITIVITY_OFF: The arrow is always insensitive + * @GTK_SENSITIVITY_AUTO: The control is made insensitive if no + * action can be triggered + * @GTK_SENSITIVITY_ON: The control is always sensitive + * @GTK_SENSITIVITY_OFF: The control is always insensitive * - * Determines how GTK handles the sensitivity of stepper arrows - * at the end of range widgets. + * Determines how GTK handles the sensitivity of various controls, + * such as combo box buttons. */ typedef enum { diff --git a/gtk/gtkscrollbar.c b/gtk/gtkscrollbar.c index 14ba704ff7..f3d02f8bf8 100644 --- a/gtk/gtkscrollbar.c +++ b/gtk/gtkscrollbar.c @@ -52,8 +52,8 @@ * #GtkAdjustment:page-size represents the size of the visible scrollable area. * The fields #GtkAdjustment:step-increment and #GtkAdjustment:page-increment * fields are added to or subtracted from the #GtkAdjustment:value when the user - * asks to move by a step (using e.g. the cursor arrow keys or, if present, the - * stepper buttons) or by a page (using e.g. the Page Down/Up keys). + * asks to move by a step (using e.g. the cursor arrow keys) or by a page (using + * e.g. the Page Down/Up keys). * * # CSS nodes * @@ -71,10 +71,6 @@ * The range node gets the style class .fine-tune added when the scrollbar is * in 'fine-tuning' mode. * - * If steppers are enabled, they are represented by up to four additional - * subnodes with name button. These get the style classes .up and .down to - * indicate in which direction they are moving. - * * Other style classes that may be added to scrollbars inside #GtkScrolledWindow * include the positional classes (.left, .right, .top, .bottom) and style * classes related to overlay scrolling (.overlay-indicator, .dragging, .hovering).