Pixmap Engine Bug



[I would post this to the gtk list, but there is nothing in the archive
after January.]

I am running into a severe problem with GTK Themes, specifically, the
Pixmap Engine. It refuses to respect specific-instance declarations, and
instead falls back onto the defaults every time. I have encountered
problems with pixmap themes before, where the menubar, menus, etc. used
the last two images in the "defaults" section (this is taken from my
BeOS theme -- the distributed version does not include this):

    image 
      {
        function        = BOX
	recolorable     = TRUE
	shadow          = IN
	file            = "button_press.png"
	border          = { 3, 4, 3, 4 }
	stretch         = TRUE
      }
    image 
      {
        function        = BOX
	recolorable     = TRUE
	file            = "button_active.png"
	border          = { 4, 3, 4, 3 }
	stretch         = TRUE
      }

instead of the correct images:

style "menu"
{
  engine "pixmap" {
    image 
      {
        function        = BOX
	recolorable     = TRUE
	file            = "menu.png"
	border          = { 2, 2, 2, 2 }
	stretch         = TRUE
      }
  }
}

class "GtkMenu" style "menu"

style "menuitem"
{
  engine "pixmap" {
    image 
      {
        function        = BOX
	recolorable     = TRUE
	file            = "menuitem.png"
	border          = { 0, 0, 0, 0 }
	stretch         = TRUE
      }
  }
}

class "GtkMenuItem" style "menuitem"

style "menubar"
{
  engine "pixmap" {
    image 
      {
        function        = BOX
	recolorable     = TRUE
	file            = "menubar.png"
	border          = { 2, 1, 2, 2 }
	stretch         = TRUE
      }
  }
}

class "GtkMenuBar" style "menubar"

Both of these sections come from the same file, but every GTK app
(including Gnomified apps) use the button_whatever images instead of
menubar, menuitem, and menu.

And this bug is not limited to buttons and menus. I have unsuccessfully
attempted to use different arrow pixmaps for the submenu-indicator
arrows (it usually uses the default right arrow). At first, I thought
that I was just doing something wrong, and as such contacted raster and
Mr. Taylor about this. After thinking for a while, I removed the arrow
definitions from the defaults section and moved them to a new GtkArrow
section, and set it up to use the arrow I wanted in menus. Lo and
behold, it worked.

I have had this bug since I first started using GTK themes, shortly
after the themes were included in the GTK CVS repository (I think it was
v. 1.1.5).

My system is as follows:

Linux 2.2.1-ac5
Glibc 2.0.111 (CVS 99.01.27)
Libtool 1.2d
Automake 1.4
Autoconf 2.13

CVS glib, gtk, imlib, and gtk-engines.

    Jim Cape
    http://www.jcinteractive.com

    "All animals are equal, some animals
     are more equal than others."
         -- George Orwell, Animal Farm



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