KDEUI
KStyle::PushButton Struct Reference
[KStyle widget representation]
Describes widgets like QPushButton.
More...
#include <kstyle.h>
Public Types | |
enum | LayoutProp { ContentsMargin, FocusMargin = ContentsMargin + MarginInc, DefaultIndicatorMargin = FocusMargin + MarginInc, PressedShiftHorizontal = DefaultIndicatorMargin + MarginInc, PressedShiftVertical, MenuIndicatorSize, TextToIconSpace } |
enum | Primitive { Panel, DefaultButtonFrame } |
Detailed Description
Describes widgets like QPushButton.
- See also:
- WT_PushButton
Definition at line 496 of file kstyle.h.
Member Enumeration Documentation
The layout of a PushButton is structured as follows:
- Between the very outside and the bevel is the default indicator area, controlled by the
PushButton::DefaultIndicatorMargin
.
- From the bevel, the content and focus rect margins are measured. Only the content margin is used to size the content area.
- Inside the content area,
PushButton::MenuIndicatorSize
is allocated to the down arrow if there is a popup menu. PushButton::TextToIconSpace
is allocated between icon and text if both exist
- See also:
- setWidgetLayoutProp()
- Enumerator:
-
ContentsMargin (5) space between the bevel and the button contents FocusMargin (3) Used to calculate the area of the focus indicator. Measured from the bevel. DefaultIndicatorMargin (0 ?) Default indicator between the very outside and the bevel. KStyle may reserve this for auto-default buttons, too, for consistency's sake. [the MainMargin sets QStyle::PM_ButtonDefaultIndicator] PressedShiftHorizontal (2) horizontal contents shift for pressed buttons [sets QStyle::PM_ButtonShiftHorizontal] PressedShiftVertical (2) vertical contents shift for pressed buttons [sets QStyle::PM_ButtonShiftVertical] MenuIndicatorSize (8) Space inside the content area, which is allocated to the down arrow if there is a popup menu [sets QStyle::PM_MenuButtonIndicator, except for toolbuttons] TextToIconSpace (6) space between the icon and the text if both exist
Relevant Generic elements:
Generic::Text
the button's textGeneric::FocusIndicator
indicating that the button has keyboard focusGeneric::ArrowDown
indicating that the button has a popup menu associated to it.
[KStyle implements QStyle::CE_PushButtonBevel
to compose the primitives]
- See also:
- drawKStylePrimitive()
The documentation for this struct was generated from the following file: