GtkStyle sometimes bypassed



In gtk 1.2.8 I have located various spots on several
widgets where the widget gets painted directly using gdk
instead of using GtkStyle.

Example gtkmenuitem.c function gtk_menu_item_paint:
  if ((state_type == GTK_STATE_PRELIGHT) &&
      (GTK_BIN (menu_item)->child))
    gtk_paint_box (widget->style,
                   widget->window,
                   GTK_STATE_PRELIGHT,
                   GTK_SHADOW_OUT,
                   area, widget, "menuitem",
                   x, y, width, height);
  else
    {
      gdk_window_set_back_pixmap (widget->window, NULL, TRUE);
      gdk_window_clear_area (widget->window, area->x, area->y, area->width,
area->height);
    }

Look at the else part. If you want to make a theme engine
that draws the menu bar in a particular way you will get
nasty solid blocks for every menu bar entry. I have put a
screen shot at http://www.upcnet.es/~jpc8/style.jpg that
shows this (and similar problems).

My proposal for this particular problem would be:
  else
    gtk_paint_box (widget->style,
                   widget->window,
                   state_type,
                   GTK_SHADOW_NONE,
                   area, widget, "menuitem",
                   x, y, width, height);

If I made some patches to address those cases, would
they make into the main source?

Thank you very much.








[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]