dialogs, widgets: Check if animations are enabled...
...when setting animations for GtkStack. Adds a check if gimp_widget_animation_enabled () is TRUE before setting an animation type in gtk_stack_set_transition_type (). If it's FALSE, then we turn off animations with GTK_STACK_TRANSITION_TYPE_NONE. This affects the Input Controller dialogue, Preferences dialogue, and the Welcome dialogue.
This commit is contained in:
parent
1b72774969
commit
bb9d36d8ae
3 changed files with 9 additions and 3 deletions
|
|
@ -90,7 +90,9 @@ extensions_dialog_new (Gimp *gimp)
|
|||
|
||||
stack = gtk_stack_new ();
|
||||
gtk_stack_set_transition_type (GTK_STACK (stack),
|
||||
GTK_STACK_TRANSITION_TYPE_SLIDE_RIGHT);
|
||||
gimp_widget_animation_enabled () ?
|
||||
GTK_STACK_TRANSITION_TYPE_SLIDE_RIGHT :
|
||||
GTK_STACK_TRANSITION_TYPE_NONE);
|
||||
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
|
||||
stack, TRUE, TRUE, 0);
|
||||
gtk_widget_show (stack);
|
||||
|
|
|
|||
|
|
@ -200,7 +200,9 @@ gimp_device_editor_init (GimpDeviceEditor *editor)
|
|||
private->stack = gtk_stack_new ();
|
||||
gtk_container_set_border_width (GTK_CONTAINER (private->stack), 12);
|
||||
gtk_stack_set_transition_type (GTK_STACK (private->stack),
|
||||
GTK_STACK_TRANSITION_TYPE_SLIDE_UP_DOWN);
|
||||
gimp_widget_animation_enabled () ?
|
||||
GTK_STACK_TRANSITION_TYPE_SLIDE_UP_DOWN :
|
||||
GTK_STACK_TRANSITION_TYPE_NONE);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), private->stack, TRUE, TRUE, 0);
|
||||
gtk_widget_show (private->stack);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -210,7 +210,9 @@ gimp_prefs_box_init (GimpPrefsBox *box)
|
|||
/* The main preferences stack */
|
||||
private->stack = gtk_stack_new ();
|
||||
gtk_stack_set_transition_type (GTK_STACK (private->stack),
|
||||
GTK_STACK_TRANSITION_TYPE_SLIDE_UP_DOWN);
|
||||
gimp_widget_animation_enabled () ?
|
||||
GTK_STACK_TRANSITION_TYPE_SLIDE_UP_DOWN :
|
||||
GTK_STACK_TRANSITION_TYPE_NONE);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), private->stack, TRUE, TRUE, 0);
|
||||
gtk_widget_show (private->stack);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue