From c6009981145d784b85990702617018ebc5d6cc8a Mon Sep 17 00:00:00 2001 From: Marijn van Vliet Date: Fri, 5 Jun 2009 12:12:59 +0000 Subject: [PATCH] Added a better default font, line spacing and margins git-svn-id: http://lassie.dyndns-server.com/svn/gargoyle-gtk@99 ddfedd41-794f-dd11-ae45-00112f111e67 --- libchimara/style.c | 4 ++-- libchimara/window.c | 3 +++ tests/main.c | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/libchimara/style.c b/libchimara/style.c index 698536f..2db2e09 100644 --- a/libchimara/style.c +++ b/libchimara/style.c @@ -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); diff --git a/libchimara/window.c b/libchimara/window.c index dea1fb6..5e0ec50 100644 --- a/libchimara/window.c +++ b/libchimara/window.c @@ -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); diff --git a/tests/main.c b/tests/main.c index 5362b4a..ee011a2 100644 --- a/tests/main.c +++ b/tests/main.c @@ -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); -- 2.30.2