[gtk+/wip/matthiasc/font-variations: 57/58] font chooser: Add scale marks on both size sliders



commit db84e8cb3e7b8e4dd4ff2bf1fb31bccd94582c73
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Dec 30 00:01:19 2017 -0500

    font chooser: Add scale marks on both size sliders
    
    This was forgotten when we added the second size slider.

 gtk/gtkfontchooserwidget.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkfontchooserwidget.c b/gtk/gtkfontchooserwidget.c
index 838dcb3..e4dcbde 100644
--- a/gtk/gtkfontchooserwidget.c
+++ b/gtk/gtkfontchooserwidget.c
@@ -142,6 +142,7 @@ struct _GtkFontChooserWidgetPrivate
   GtkWidget *size_label;
   GtkWidget *size_spin;
   GtkWidget *size_slider;
+  GtkWidget *size_slider2;
 
   GtkWidget *font_grid;
 
@@ -521,6 +522,7 @@ gtk_font_chooser_widget_update_marks (GtkFontChooserWidget *fontchooser)
     }
 
   gtk_scale_clear_marks (GTK_SCALE (priv->size_slider));
+  gtk_scale_clear_marks (GTK_SCALE (priv->size_slider2));
 
   adj        = gtk_range_get_adjustment (GTK_RANGE (priv->size_slider));
   spin_adj   = gtk_spin_button_get_adjustment (GTK_SPIN_BUTTON (priv->size_spin));
@@ -549,6 +551,9 @@ gtk_font_chooser_widget_update_marks (GtkFontChooserWidget *fontchooser)
       gtk_scale_add_mark (GTK_SCALE (priv->size_slider),
                           sizes[i],
                           GTK_POS_BOTTOM, NULL);
+      gtk_scale_add_mark (GTK_SCALE (priv->size_slider2),
+                          sizes[i],
+                          GTK_POS_BOTTOM, NULL);
     }
 
   g_free (font_sizes);
@@ -790,6 +795,7 @@ gtk_font_chooser_widget_class_init (GtkFontChooserWidgetClass *klass)
   gtk_widget_class_bind_template_child_private (widget_class, GtkFontChooserWidget, size_label);
   gtk_widget_class_bind_template_child_private (widget_class, GtkFontChooserWidget, size_spin);
   gtk_widget_class_bind_template_child_private (widget_class, GtkFontChooserWidget, size_slider);
+  gtk_widget_class_bind_template_child_private (widget_class, GtkFontChooserWidget, size_slider2);
   gtk_widget_class_bind_template_child_private (widget_class, GtkFontChooserWidget, stack);
   gtk_widget_class_bind_template_child_private (widget_class, GtkFontChooserWidget, grid);
   gtk_widget_class_bind_template_child_private (widget_class, GtkFontChooserWidget, font_grid);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]