GTK+ FAQ
<<< Previous | Development with GTK+: general questions | Next >>>

# Why don't the contents of a button move when the button is pressed? Here's a patch to make it work that way... [GTK 2.x]

From: Peter Mattis

"The reason buttons don't move their child down and to the right when they are depressed is because I don't think that's what is happening visually. My view of buttons is that you are looking at them straight on. That is, the user interface lies in a plane and you're above it looking straight at it. When a button gets pressed it moves directly away from you. To be absolutely correct I guess the child should actually shrink a tiny amount. But I don't see why the child should shift down and to the left. Remember, the child is supposed to be attached to the buttons surface. Its not good for it to appear like the child is slipping on the surface of the button."

"On a more practical note, I did implement this at one point and determined it didn't look good and removed it."

<<< Previous | Home | Next >>>
Why does this strange 'x io error' occur when I `fork()` in my GTK+ app? [GTK 2.x] | Up | How do I identifiy a widgets top level window or other ancestor? [GTK 2.x]