Thursday, August 4, 2016

GUI elements: The Panel

Creating a graphical user interface in Gimp.


Part 3: The Panel


The box is great for containing, or separating things, but sometimes you need something that pops out, and grabs the user's attention like a menu, or some other interactive part of the gui.
Something that is easily scaleable, and doesn't look like it's just part of the page.



 Step 1:

Create a new image with a transparent background.

Step 2:

Grab the Rectangle tool, and set it to use the Fixed Aspect ratio of  1x1.
That means all four sides will be the same no matter how you scale the selection.
Make a selection, the size you want, on the layer.

Step 3:

Right click on the image, and choose Rounded Rectangle.
Set it to 25, and hit ok.
Higher numbers make it more round.
This is just a simple method to get rounded corners.
I'll show you a few other methods later.

Step 4:

Get the Paint tool, and fill in the layer with black.
Then create a new layer and select it on the layers dialog.
Remember the selection will apply to this layer as well.

Step 5:

We need to give the Panel just a bit of color, and using the same pattern of colors makes it easy for a user to remember what something is. A palette such as the Tango scheme will make remembering what you used much easier. If you are unfamiliar with them you can take a look at the documentation at Gimp.org.

Step 6:

Fill the new layer with Aluminium 4 sing the Bucket fill tool.

Step 7:

We'll add a little bit of styling with an additional color.
To do that, right click the layer, and choose Shrink selection, 3 pixels.
Then change the palette to Sky Blue 1, and fill in the new selection.
Note that the Aluminium 4 is now a border.
Now Shrink the selection one more time(3 pixels), and change the fill color to Aluminium 1.
Now that you have decided on the basic style of the Panel, you can create as many as you like of differing sizes, just remember fill 3, shrink 3.
The Basic Panel is now finished, but we still need to make it pop out some.

Step 8:

Go back to the original layer in the layers dialog, and select it.
Right click on the image, and select Filters> Blur> Gaussian Blur.

  Step 9:

When the blur menu pops up set the radius for Horizontal, and Vertical to 8, and hit ok.

 Step 10:

Go back to the Panel layer in the Layers dialog, and select it.
Right click there, or on the image, and choose Merge Down.

Step 11:

To export it, right click on the image, and choose Autocrop Image.
This will get rid of unused space, and center the image.
I would suggest exporting it as .png.

Optional Steps:

If you want a transparent fill, the Border selection option works nicely.
Just create your selection as you would normally, and right click Border...
Keep in mind that it starts from where it selection starts and goes both ways to make the border, so the object may be bigger than the original.






 Then fill it.


 Take note that the inner corners are not rounded.

Another method I use for creating different shapes is using a custom script: Morphselection
This takes the fill and rounds all corners, where Rounded corners just generates a box of four sides.


Right click the image, Select> Morph-selection









No comments:

Post a Comment