Creating a graphical user interface in Gimp
Part 5: The Switch
The switch is a lot like a button in that it can be used to turn something on, or off, but sometimes you need something that can tell you what state it is in with a quick glance.
After creating a new image with a transparent background, go to the rectangle selection tool.
Check Rounded corners, and set it to 16, which is half the height our switch will be.
Then of course set the Size to 72 width, and 32 height.
Click somewhere in the middle of the layer to make a selection.
It doesn't have to be perfectly centered, we'll fix that with a crop later.
Grab the bucket fill tool, and fill it with Aluminium 2 from the Tango Palette.
Then release the selection. Right click> Select >None.
Right click> Layer> Autocrop layer
We'll center it in the next step.
Now let's use the Alignment Tool for a couple steps.
First make sure the layer is selected, then choose the tool, then click on the part we want to center.
When its elected by the tool it will have four little squares on all four sides of the layer.
Now go back to the tools options, and click the top middle button with the arrows pointing at each other called: Align center of target. That will center it horizontally, and the button underneath that called: Align middle of target, will center it vertically.
Create a new transparent layer, and select it.
Then grab the Circle Selection Tool once again.
This time we just set the selection size to 32 width, and 32 height.
Click on the new layer to create the selection. Somewhere close to the left side of the texture in the first layer. Then fill it with Aluminium 6.
Next we Autocrop that new layer to get ready to align it to the bottom layer.
Select the bottom layer in the layers dialog.
Go to the Align tool, change it from Relative to: First item, to Active layer.
With the Align tool click on the image, directly on the filled circle to get it rather than the bottom layer selected by the tool.
Now go back to the Align Tool, and click the top left side button that looks like an arrow pointing left. The one called: Align left edge of target, and click it.
That will move it to the left most border of the active layer.
Then click the Align middle of target button to center it vertically.
Finally merge the two layers together, and Autocrop once more, and export to png.