spacing added
This commit is contained in:
parent
b84dfc8226
commit
2479064f58
@ -34,6 +34,8 @@ namespace
|
|||||||
{
|
{
|
||||||
using Q = QskPushButton;
|
using Q = QskPushButton;
|
||||||
|
|
||||||
|
setSpacing( button->spacingHint( Q::Panel ) );
|
||||||
|
|
||||||
const auto graphicSourceSize = button->graphic().defaultSize();
|
const auto graphicSourceSize = button->graphic().defaultSize();
|
||||||
|
|
||||||
const bool hasText = !button->text().isEmpty();
|
const bool hasText = !button->text().isEmpty();
|
||||||
|
@ -143,6 +143,10 @@ QSizeF QskSubcontrolLayoutEngine::TextElement::implicitSize( const QSizeF& const
|
|||||||
const auto font = skinnable()->effectiveFont( subControl() );
|
const auto font = skinnable()->effectiveFont( subControl() );
|
||||||
const auto textOptions = skinnable()->textOptionsHint( subControl() );
|
const auto textOptions = skinnable()->textOptionsHint( subControl() );
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
// what about skinnable()->strutSizeHint( subControl() ); ????
|
||||||
|
#endif
|
||||||
|
|
||||||
QSizeF hint;
|
QSizeF hint;
|
||||||
|
|
||||||
const qreal lineHeight = QFontMetricsF( font ).height();
|
const qreal lineHeight = QFontMetricsF( font ).height();
|
||||||
@ -308,6 +312,16 @@ Qt::Orientation QskSubcontrolLayoutEngine::orientation() const
|
|||||||
return m_data->orientation;
|
return m_data->orientation;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void QskSubcontrolLayoutEngine::setSpacing( qreal spacing )
|
||||||
|
{
|
||||||
|
Inherited::setSpacing( spacing, Qt::Horizontal | Qt::Vertical );
|
||||||
|
}
|
||||||
|
|
||||||
|
qreal QskSubcontrolLayoutEngine::spacing() const
|
||||||
|
{
|
||||||
|
return Inherited::spacing( m_data->orientation );
|
||||||
|
}
|
||||||
|
|
||||||
void QskSubcontrolLayoutEngine::setElementAt( int index, LayoutElement* element )
|
void QskSubcontrolLayoutEngine::setElementAt( int index, LayoutElement* element )
|
||||||
{
|
{
|
||||||
if ( index >= 0 && index < count() )
|
if ( index >= 0 && index < count() )
|
||||||
|
@ -22,6 +22,8 @@ class QskSkinnable;
|
|||||||
*/
|
*/
|
||||||
class QskSubcontrolLayoutEngine : public QskLayoutEngine2D
|
class QskSubcontrolLayoutEngine : public QskLayoutEngine2D
|
||||||
{
|
{
|
||||||
|
using Inherited = QskLayoutEngine2D;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
class LayoutElement : public QskLayoutElement
|
class LayoutElement : public QskLayoutElement
|
||||||
{
|
{
|
||||||
@ -116,6 +118,9 @@ class QskSubcontrolLayoutEngine : public QskLayoutEngine2D
|
|||||||
Qt::Orientation orientation() const;
|
Qt::Orientation orientation() const;
|
||||||
bool setOrientation( Qt::Orientation );
|
bool setOrientation( Qt::Orientation );
|
||||||
|
|
||||||
|
void setSpacing( qreal );
|
||||||
|
qreal spacing() const;
|
||||||
|
|
||||||
void setElementAt( int index, LayoutElement* );
|
void setElementAt( int index, LayoutElement* );
|
||||||
LayoutElement* elementAt( int ) const;
|
LayoutElement* elementAt( int ) const;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user