Added a better default font, line spacing and margins
authorMarijn van Vliet <marijn.vanvliet@med.kuleuven.be>
Fri, 5 Jun 2009 12:12:59 +0000 (12:12 +0000)
committerMarijn van Vliet <marijn.vanvliet@med.kuleuven.be>
Fri, 5 Jun 2009 12:12:59 +0000 (12:12 +0000)
git-svn-id: http://lassie.dyndns-server.com/svn/gargoyle-gtk@99 ddfedd41-794f-dd11-ae45-00112f111e67

libchimara/style.c
libchimara/window.c
tests/main.c

index 698536f101f29417d98ecfacb75ae540e498b17e..2db2e09e45fcd8395f9cdf46476340adb25606a0 100644 (file)
@@ -65,8 +65,8 @@ style_init_textbuffer(GtkTextBuffer *buffer)
        gtk_text_buffer_create_tag(buffer, "normal", NULL);
        gtk_text_buffer_create_tag(buffer, "emphasized", "style", PANGO_STYLE_ITALIC, NULL);
        gtk_text_buffer_create_tag(buffer, "preformatted", "font-desc", glk_data->monospace_font_desc, NULL);
-       gtk_text_buffer_create_tag(buffer, "header", "size-points", 16.0, "weight", PANGO_WEIGHT_BOLD, NULL);
-       gtk_text_buffer_create_tag(buffer, "subheader", "size-points", 12.0, "weight", PANGO_WEIGHT_BOLD, NULL);
+       gtk_text_buffer_create_tag(buffer, "header", "size-points", 18.0, "weight", PANGO_WEIGHT_BOLD, NULL);
+       gtk_text_buffer_create_tag(buffer, "subheader", "size-points", 14.0, "weight", PANGO_WEIGHT_BOLD, NULL);
        gtk_text_buffer_create_tag(buffer, "alert", "foreground", "#aa0000", "weight", PANGO_WEIGHT_BOLD, NULL);
        gtk_text_buffer_create_tag(buffer, "note", "foreground", "#aaaa00", "weight", PANGO_WEIGHT_BOLD, NULL);
        gtk_text_buffer_create_tag(buffer, "block-quote", "justification", GTK_JUSTIFY_CENTER, "style", PANGO_STYLE_ITALIC, NULL);
index dea1fb60c64f76fcb35263ba7bcba635220ab296..5e0ec5015ff95cfded035c18a4b5882d08499a5d 100644 (file)
@@ -454,6 +454,9 @@ glk_window_open(winid_t split, glui32 method, glui32 size, glui32 wintype,
                        
                        gtk_text_view_set_wrap_mode( GTK_TEXT_VIEW(textview), GTK_WRAP_WORD_CHAR );
                        gtk_text_view_set_editable( GTK_TEXT_VIEW(textview), FALSE );
+                       gtk_text_view_set_pixels_inside_wrap( GTK_TEXT_VIEW(textview), 3 );
+                       gtk_text_view_set_left_margin( GTK_TEXT_VIEW(textview), 20 );
+                       gtk_text_view_set_right_margin( GTK_TEXT_VIEW(textview), 20 );
 
                        gtk_container_add( GTK_CONTAINER(scrolledwindow), textview );
                        gtk_widget_show_all(scrolledwindow);
index 5362b4a67948e308453f3a62ac27690da9f2d2cd..ee011a20c5667ec6de13423c0fdd41f2ec1fd24d 100644 (file)
@@ -73,8 +73,8 @@ create_window(void)
        
        glk = chimara_glk_new();
        g_object_set(glk, "border-width", 6, "spacing", 6, NULL);
-       chimara_glk_set_default_font_string(CHIMARA_GLK(glk), "Sans 11");
-       chimara_glk_set_monospace_font_string(CHIMARA_GLK(glk), "Monospace 10");
+       chimara_glk_set_default_font_string(CHIMARA_GLK(glk), "Serif 12");
+       chimara_glk_set_monospace_font_string(CHIMARA_GLK(glk), "Monospace 12");
        g_signal_connect(glk, "started", G_CALLBACK(on_started), NULL);
        g_signal_connect(glk, "stopped", G_CALLBACK(on_stopped), NULL);