K4Style::PushButton Struct Reference

#include <k4style.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

Definition at line 481 of file k4style.h.

Member Enumeration Documentation

The layout of a PushButton is structured as follows:

  1. Between the very outside and the bevel is the default indicator area, controlled by the PushButton::DefaultIndicatorMargin .

  1. From the bevel, the content and focus rect margins are measured. Only the content margin is used to size the content area.
  2. Inside the content area, PushButton::MenuIndicatorSize is allocated to the down arrow if there is a popup menu.
  3. PushButton::TextToIconSpace is allocated between icon and text if both exist
See also

(5) space between the bevel and the button contents


(3) Used to calculate the area of the focus indicator. Measured from the bevel.


(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]


(2) horizontal contents shift for pressed buttons [sets QStyle::PM_ButtonShiftHorizontal]


(2) vertical contents shift for pressed buttons [sets QStyle::PM_ButtonShiftVertical]


(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]


(6) space between the icon and the text if both exist

Definition at line 494 of file k4style.h.

Relevant Generic elements:

[K4Style implements QStyle::CE_PushButtonBevel to compose the primitives]

See also

the pushbutton panel [implements QStyle::PE_PanelButtonCommand]


frame indicating a default button, painted before the button Panel [implements QStyle::PE_FrameDefaultButton]

Definition at line 514 of file k4style.h.

The documentation for this struct was generated from the following file:
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Wed Aug 5 2020 22:56:35 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.