Overview

screenshot.png

Style Properties

Name

Type

Default

Nick

Description

misc

inner-border

boxed

{2 ,2 ,2 ,2}

Inner Border

Border between text and frame.

{left, right, top, bottom}

Please note that the inner-border should not be zero. Some fonts actually need more space to draw than they report, and setting this to zero may lead to characters that are cut off at one side (eg. "Å" at the top)!

Geometry

If GtkWidget::interior-focus = 1 then the geometry will be like this:

geometry.png XXX: This is of course not inside-border but inner-border.

If interior-focus is not turned on, then the entry will get a focus. If it does not have the focus, it will just be drawn bigger, and as soon as it gets the focus it will look like this:

geometry-exterior-focus.png

inner-border

The full inner area including the inner-border area is the clickable area of the GtkEntry. This area is also fully used when rendering text. This can happen if the font draws outside the reported area, or if there is a lot of text. With a lot of text GtkEntry will use the entire area, including the inner-border at one or both sides.

Drawing

The outside box of the entry is a shadow drawn with state NORMAL and shadow IN. The detail is "entry". If the widget has the focus, and inner-focus is 0, then a focus will be drawn around the box with the widgets current state (XXX: will that be NORMAL?). Also in this case the outside box is drawn smaller by the size of the focus.

../GtkEntry will also draw a flat_box for the area that text is in. The detail used is "entry_bg", state is the real state and shadow is NONE. Note that this is only for the inner area. (see below, in the note about windows)

Windows

../GtkEntry consists of two GdkWindows. This is important for drawing, as each of these windows cannot be transparent. Both of these windows are filled with the base color (of the current state).

The first window is the size of the widget. This window contains the outside box, and the focus.

The second window is smaller, and only for the inner area that contains the text. This contains just the text area with the inner-border around it.

GTK+ API Documentation

http://library.gnome.org/devel/gtk/stable/GtkEntry.html

Attic/GnomeArt/Tutorials/GtkThemes/GtkEntry (last edited 2013-11-27 14:33:57 by WilliamJonMcCann)