~danieljabailey/inkscape/arc_node_editor

« back to all changes in this revision

Viewing changes to src/widgets/ruler.cpp

  • Committer: tavmjong-free
  • Date: 2016-05-08 07:44:05 UTC
  • mfrom: (14873.1.1 gtk3)
  • Revision ID: tavmjong@free.fr-20160508074405-rm6tiapoq1ugamph
Start of GTK3 external style sheet support.

Show diffs side-by-side

added added

removed removed

Lines of Context:
282
282
  priv->pos_redraw_idle_id   = 0;
283
283
 
284
284
  priv->font_scale           = DEFAULT_RULER_FONT_SCALE;
285
 
 
286
 
#if GTK_CHECK_VERSION(3,0,0)
287
 
  // Hard code off-white for the moment. Where is @bg_color defined?
288
 
  const gchar *str = 
289
 
    "SPRuler {\n"
290
 
//    "  background-color: @bg_color;\n"
291
 
      "  background-color: #f8f8f8;\n"
292
 
    "}\n";
293
 
  GtkCssProvider *css = gtk_css_provider_new ();
294
 
  gtk_css_provider_load_from_data (css, str, -1, NULL);
295
 
  gtk_style_context_add_provider (gtk_widget_get_style_context (GTK_WIDGET (ruler)),
296
 
                                  GTK_STYLE_PROVIDER (css),
297
 
                                  GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
298
 
  g_object_unref (css);
299
 
#endif
300
285
}
301
286
 
302
287
static void