comparison src/gtkimhtml.c @ 3469:15089f9d3431

[gaim-migrate @ 3519] I just realized that people with dark themes won't like this at all. Better to keep it solid colored for now. committer: Tailor Script <tailor@pidgin.im>
author Sean Egan <seanegan@gmail.com>
date Thu, 29 Aug 2002 06:30:52 +0000
parents 3122c2eec3e8
children 2f8f4f1dac98
comparison
equal deleted inserted replaced
3468:3122c2eec3e8 3469:15089f9d3431
429 429
430 gdk_window_set_cursor (widget->window, imhtml->arrow_cursor); 430 gdk_window_set_cursor (widget->window, imhtml->arrow_cursor);
431 431
432 imhtml->default_font = gdk_font_ref (GTK_IMHTML_GET_STYLE_FONT (widget->style)); 432 imhtml->default_font = gdk_font_ref (GTK_IMHTML_GET_STYLE_FONT (widget->style));
433 433
434 gtk_style_apply_default_background (widget->style, widget->window, TRUE, GTK_STATE_NORMAL, 434 gdk_window_set_background (widget->window, &widget->style->base [GTK_STATE_NORMAL]);
435 NULL, 0, 0, attributes.width, attributes.height); 435 gdk_window_set_background (GTK_LAYOUT (imhtml)->bin_window,
436 gtk_style_apply_default_background (widget->style, GTK_LAYOUT(imhtml)->bin_window, TRUE, GTK_STATE_NORMAL, 436 &widget->style->base [GTK_STATE_NORMAL]);
437 NULL, 0, 0, attributes.width, attributes.height);
438 437
439 imhtml->default_fg_color = gdk_color_copy (&GTK_WIDGET (imhtml)->style->fg [GTK_STATE_NORMAL]); 438 imhtml->default_fg_color = gdk_color_copy (&GTK_WIDGET (imhtml)->style->fg [GTK_STATE_NORMAL]);
440 imhtml->default_bg_color = gdk_color_copy (&GTK_WIDGET (imhtml)->style->base [GTK_STATE_NORMAL]); 439 imhtml->default_bg_color = gdk_color_copy (&GTK_WIDGET (imhtml)->style->base [GTK_STATE_NORMAL]);
441 imhtml->default_hl_color = gdk_color_copy (&GTK_WIDGET (imhtml)->style->bg [GTK_STATE_SELECTED]); 440 imhtml->default_hl_color = gdk_color_copy (&GTK_WIDGET (imhtml)->style->bg [GTK_STATE_SELECTED]);
442 imhtml->default_hlfg_color=gdk_color_copy (&GTK_WIDGET (imhtml)->style->fg [GTK_STATE_SELECTED]); 441 imhtml->default_hlfg_color=gdk_color_copy (&GTK_WIDGET (imhtml)->style->fg [GTK_STATE_SELECTED]);
488 gdk_gc_set_foreground (gc, bit->bg); 487 gdk_gc_set_foreground (gc, bit->bg);
489 bg = bit->bg; 488 bg = bit->bg;
490 } else { 489 } else {
491 gdk_color_alloc (cmap, imhtml->default_bg_color); 490 gdk_color_alloc (cmap, imhtml->default_bg_color);
492 gdk_gc_set_foreground (gc, imhtml->default_bg_color); 491 gdk_gc_set_foreground (gc, imhtml->default_bg_color);
493 if (GTK_WIDGET(imhtml)->style->bg_pixmap[GTK_STATE_NORMAL]) {
494 gdk_gc_set_tile(gc, GTK_WIDGET(imhtml)->style->bg_pixmap[GTK_STATE_NORMAL]);
495 gdk_gc_set_fill (gc, GDK_TILED);
496 }
497 bg = imhtml->default_bg_color; 492 bg = imhtml->default_bg_color;
498 } 493 }
499 494
500 gdk_draw_rectangle (window, gc, TRUE, line->x - xoff, line->y - yoff, 495 gdk_draw_rectangle (window, gc, TRUE, line->x - xoff, line->y - yoff,
501 line->width ? line->width : imhtml->xsize, line->height); 496 line->width ? line->width : imhtml->xsize, line->height);
502 gdk_gc_set_fill(gc, GDK_SOLID); 497
503 if (!line->text) { 498 if (!line->text) {
504 gdk_gc_unref (gc); 499 gdk_gc_unref (gc);
505 return; 500 return;
506 } 501 }
507 502
647 gdk_color_alloc (cmap, bit->bg); 642 gdk_color_alloc (cmap, bit->bg);
648 gdk_gc_set_foreground (gc, bit->bg); 643 gdk_gc_set_foreground (gc, bit->bg);
649 } else { 644 } else {
650 gdk_color_alloc (cmap, imhtml->default_bg_color); 645 gdk_color_alloc (cmap, imhtml->default_bg_color);
651 gdk_gc_set_foreground (gc, imhtml->default_bg_color); 646 gdk_gc_set_foreground (gc, imhtml->default_bg_color);
652 if (GTK_WIDGET(imhtml)->style->bg_pixmap[GTK_STATE_NORMAL]) {
653 gdk_gc_set_tile(gc, GTK_WIDGET(imhtml)->style->bg_pixmap[GTK_STATE_NORMAL]);
654 gdk_gc_set_fill(gc, GDK_TILED);
655 }
656 } 647 }
657 648
658 gdk_draw_rectangle (window, gc, TRUE, line->x - xoff, line->y - yoff, line->width, line->height); 649 gdk_draw_rectangle (window, gc, TRUE, line->x - xoff, line->y - yoff, line->width, line->height);
659 gdk_gc_set_fill(gc, GDK_SOLID);
660 650
661 if (line->selected) { 651 if (line->selected) {
662 gdk_color_alloc (cmap, imhtml->default_hl_color); 652 gdk_color_alloc (cmap, imhtml->default_hl_color);
663 gdk_gc_set_foreground(gc, imhtml->default_hl_color); 653 gdk_gc_set_foreground(gc, imhtml->default_hl_color);
664 gdk_draw_rectangle (window, gc, TRUE, line->x - xoff, line->y - yoff, 654 gdk_draw_rectangle (window, gc, TRUE, line->x - xoff, line->y - yoff,
868 gdk_font_unref (imhtml->default_font); 858 gdk_font_unref (imhtml->default_font);
869 imhtml->default_font = gdk_font_ref (GTK_IMHTML_GET_STYLE_FONT (widget->style)); 859 imhtml->default_font = gdk_font_ref (GTK_IMHTML_GET_STYLE_FONT (widget->style));
870 gdk_window_set_background (widget->window, &widget->style->base [GTK_STATE_NORMAL]); 860 gdk_window_set_background (widget->window, &widget->style->base [GTK_STATE_NORMAL]);
871 gdk_window_set_background (GTK_LAYOUT (imhtml)->bin_window, 861 gdk_window_set_background (GTK_LAYOUT (imhtml)->bin_window,
872 &widget->style->base [GTK_STATE_NORMAL]); 862 &widget->style->base [GTK_STATE_NORMAL]);
873
874 gtk_imhtml_draw_exposed (imhtml); 863 gtk_imhtml_draw_exposed (imhtml);
875 } 864 }
876 865
877 static gint 866 static gint
878 gtk_imhtml_expose_event (GtkWidget *widget, 867 gtk_imhtml_expose_event (GtkWidget *widget,