KDELibs4Support

K4Style::ToolButton Struct Reference

#include <k4style.h>

Public Types

enum  LayoutProps {
  ContentsMargin, FocusMargin = ContentsMargin + MarginInc, MenuIndicatorSize, InlineMenuIndicatorSize = FocusMargin + MarginInc,
  InlineMenuIndicatorXOff, InlineMenuIndicatorYOff
}
 
enum  Primitive { Panel }
 

Detailed Description

Describes widgets like QToolButton (usually inside a QToolBar).

The drawing of ToolButton's is much like that of PushButtons; however, in some cases the widget is configured to not have a separate arrow area, but to incorporate the area inside the button itself. To handle this mode, set InlineMenuIndicatorSize to the size of the arrow, and the InlineMenuIndicatorXOff, and InlineMenuIndicatorYOff to offset from the bottom-right corner to place that rectangle. If InlineMenuIndicatorSize isn't set, the arrow won't be drawn.

See also
WT_ToolButton

Definition at line 1300 of file k4style.h.

Member Enumeration Documentation

See also
setWidgetLayoutProp()
Enumerator
ContentsMargin 

(5) Margin reserved around the contents size of a toolbutton.

Used to size the contents.

FocusMargin 

(3) Where the focus rect will be drawn, measured from the widget sides

MenuIndicatorSize 

(11) Size for the separate menu arrows on tool buttons [sets QStyle::PM_MenuButtonIndicator wheen a toolbutton option is passed in]

InlineMenuIndicatorSize 

(0) Size of arrow when it's incorporated into the button directly.

If it's 0, it will not be drawn

Since
4.1
InlineMenuIndicatorXOff 

Horizontal offset off the bottom-right corner to place the arrow if it's incorporated directly, and not in a separate area.

Since
4.1
InlineMenuIndicatorYOff 

Vertical offset off the bottom-right corner to place the arrow if it's incorporated directly, and not in a separate area.

Since
4.1

Definition at line 1304 of file k4style.h.

Relevant Generic elements:

Todo:
Implement CE_ToolButtonLabel to have own Generic::Text, Generic::Icon, and LayoutProps PressedShiftHorizontal, PressedShiftVertical, TextToIconSpace, MenuIndicatorSize...
See also
drawKStylePrimitive()
Enumerator
Panel 

the toolbutton panel [implements QStyle::PE_PanelButtonTool]

Definition at line 1333 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 Sat Jul 11 2020 22:58:06 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.