Creating a graphical user interface in Gimp
Part 4: The Button
Unlike a panel, buttons are usually just one size. Even with thousands of variations most still work as frames. One frame is on, the other off.
In this tut I'll show how to make a simple button, and how you can add some variations using color.
We'll use the rectangle tool to make a rectangular selection.
You might notice the tool itself also has an option to round corners, so let's use it this time.
Set it to a radius of 6, and make your selection about 128 by 64 in the center of the layer.
Be sure to keep the selection.
Fill it with Aluminium 5, and right click the image Select: None.
Click on the image again, and use the up arrow button to move the layer up 6 pixels.
Merge the top frame down onto the background.
Autocrop the image, and save it as a png to preserve its transparency.
Right click the image: Edit> Undo the autocrop, and undo the merge down.
Then go back to the top layer, and make sure it is selected in the layers dialog.
Right click there or on the image, Layer>Transparency>Alpha to Selection to get the selection of the last fill.
Add a brand new layer, select it, and fill it with Aluminium 4.
Release the selection once again, and grab the move tool.
Click on the image, and use the up arrow button to move that layer up 4 pixels this time.
You can still use the background, and other layers to make more buttons with different colors.
Just be sure to delete the old layer, and make a new one, as bucket filling on something that was already filled will leave some artifacts.