changeset 8380:4a5b36510665

[gaim-migrate @ 9108] Just a minor WYSIWYG fix; now the grow and shrink buttons work properly. Also, the CSS standard says that each font size should be 1.2 times the size of the next smallest, and W3C tends to be smart about these things, so I did that. Also, timestamps are once again size=2, which I think looks better. committer: Tailor Script <tailor@pidgin.im>
author Sean Egan <seanegan@gmail.com>
date Mon, 01 Mar 2004 20:52:57 +0000
parents 1a9388ae699e
children 95afeb9a0c96
files src/gtkconv.c src/gtkimhtml.c src/gtkimhtmltoolbar.c
diffstat 3 files changed, 9 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/src/gtkconv.c	Mon Mar 01 18:09:21 2004 +0000
+++ b/src/gtkconv.c	Mon Mar 01 20:52:57 2004 +0000
@@ -4413,13 +4413,13 @@
 
 	if (flags & GAIM_MESSAGE_SYSTEM) {
 		if (gaim_prefs_get_bool("/gaim/gtk/conversations/show_timestamps"))
-			g_snprintf(buf, BUF_LONG, "(%s) <B>%s</B>",
+			g_snprintf(buf, BUF_LONG, "<FONT SIZE=\"2\">(%s)</FONT> <B>%s</B>",
 				   mdate, message);
 		else
 			g_snprintf(buf, BUF_LONG, "<B>%s</B>", message);
 
 		g_snprintf(buf2, sizeof(buf2),
-			   "<FONT %s><!--(%s) --><B>%s</B></FONT><BR>",
+			   "<FONT %s><FONT SIZE=\2\"><!--(%s) --></FONT><B>%s</B></FONT><BR>",
 			   sml_attrib, mdate, message);
 
 		gtk_imhtml_append_text_with_images(GTK_IMHTML(gtkconv->imhtml), buf2, 0, images);
@@ -4495,7 +4495,7 @@
 
 		if (gaim_prefs_get_bool("/gaim/gtk/conversations/show_timestamps"))
 			g_snprintf(buf, BUF_LONG,
-				   "<FONT COLOR=\"%s\" %s>(%s) "
+				   "<FONT COLOR=\"%s\" %s><FONT SIZE=\"2\">(%s)</FONT> "
 				   "<B>%s</B></FONT> ", color,
 				   sml_attrib ? sml_attrib : "", mdate, str);
 		else
@@ -4504,7 +4504,7 @@
 				   sml_attrib ? sml_attrib : "", str);
 
 		g_snprintf(buf2, BUF_LONG,
-			   "<FONT COLOR=\"%s\" %s><!--(%s) -->"
+			   "<FONT COLOR=\"%s\" %s><FONT SIZE=\"2\"><!--(%s) --></FONT>"
 			   "<B>%s</B></FONT> ",
 			   color, sml_attrib ? sml_attrib : "", mdate, str);
 
--- a/src/gtkimhtml.c	Mon Mar 01 18:09:21 2004 +0000
+++ b/src/gtkimhtml.c	Mon Mar 01 20:52:57 2004 +0000
@@ -70,7 +70,7 @@
  * way that it base the sizes off the default font size rather than using arbitrary font sizes. */
 #define MAX_FONT_SIZE 7
 #define POINT_SIZE(x) (options & GTK_IMHTML_USE_POINTSIZE ? x : _point_sizes [MIN ((x), MAX_FONT_SIZE) - 1])
-static gdouble _point_sizes [] = { .75, .85, 1, 1.2, 1.7, 2.5, 3.5};
+static gdouble _point_sizes [] = { .69444444, .8333333, 1, 1.2, 1.44, 1.728, 2.0736};
 
 enum {
 	TARGET_HTML,
--- a/src/gtkimhtmltoolbar.c	Mon Mar 01 18:09:21 2004 +0000
+++ b/src/gtkimhtmltoolbar.c	Mon Mar 01 20:52:57 2004 +0000
@@ -61,7 +61,8 @@
 do_small(GtkWidget *smalltb, GtkIMHtmlToolbar *toolbar)
 {
 	g_return_if_fail(toolbar);
-	gtk_imhtml_font_shrink(GTK_IMHTML(toolbar->imhtml));
+	if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(toolbar->smaller_size)))
+		gtk_imhtml_font_shrink(GTK_IMHTML(toolbar->imhtml));
 	gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(toolbar->smaller_size), FALSE);
 	gtk_widget_grab_focus(toolbar->imhtml);
 }
@@ -70,7 +71,8 @@
 do_big(GtkWidget *large, GtkIMHtmlToolbar *toolbar)
 {
 	g_return_if_fail(toolbar);
-	gtk_imhtml_font_grow(GTK_IMHTML(toolbar->imhtml));
+	if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(toolbar->larger_size)))
+		gtk_imhtml_font_grow(GTK_IMHTML(toolbar->imhtml));
 	gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(toolbar->larger_size), FALSE);
 	gtk_widget_grab_focus(toolbar->imhtml);
 }