orientation removed from the placement bits
This commit is contained in:
parent
4c10d8b0e4
commit
454688361c
@ -598,8 +598,7 @@ void Editor::setupPushButton()
|
|||||||
|
|
||||||
setFlagHint( Q::Text | Q::Disabled | A::Style, Qsk::Sunken );
|
setFlagHint( Q::Text | Q::Disabled | A::Style, Qsk::Sunken );
|
||||||
|
|
||||||
setAlignment( Q::Text | A::Vertical, Qt::AlignCenter );
|
setAlignment( Q::Text, Qt::AlignCenter );
|
||||||
setAlignment( Q::Text | A::Horizontal, Qt::AlignLeft | Qt::AlignVCenter );
|
|
||||||
|
|
||||||
setColor( Q::Text, m_pal.themeForeground );
|
setColor( Q::Text, m_pal.themeForeground );
|
||||||
setColor( Q::Text | Q::Disabled, m_pal.darker200 );
|
setColor( Q::Text | Q::Disabled, m_pal.darker200 );
|
||||||
|
@ -14,8 +14,6 @@
|
|||||||
#include "QskSkinlet.h"
|
#include "QskSkinlet.h"
|
||||||
#include "QskTextOptions.h"
|
#include "QskTextOptions.h"
|
||||||
|
|
||||||
#include <qfontmetrics.h>
|
|
||||||
|
|
||||||
QSK_SUBCONTROL( QskPushButton, Panel )
|
QSK_SUBCONTROL( QskPushButton, Panel )
|
||||||
QSK_SUBCONTROL( QskPushButton, Ripple )
|
QSK_SUBCONTROL( QskPushButton, Ripple )
|
||||||
QSK_SUBCONTROL( QskPushButton, Text )
|
QSK_SUBCONTROL( QskPushButton, Text )
|
||||||
@ -229,26 +227,6 @@ void QskPushButton::updateResources()
|
|||||||
|
|
||||||
QskAspect::Placement QskPushButton::effectivePlacement() const
|
QskAspect::Placement QskPushButton::effectivePlacement() const
|
||||||
{
|
{
|
||||||
if ( hasGraphic() && !text().isEmpty() )
|
|
||||||
{
|
|
||||||
// for the moment we only support the direction. TODO ...
|
|
||||||
|
|
||||||
auto aspect = Panel | QskAspect::Direction;
|
|
||||||
aspect.setPlacement( QskAspect::Vertical ); // to avoid recursions TODO ...
|
|
||||||
|
|
||||||
const auto dir = flagHint( aspect, Qsk::LeftToRight );
|
|
||||||
switch( dir )
|
|
||||||
{
|
|
||||||
case Qsk::LeftToRight:
|
|
||||||
case Qsk::RightToLeft:
|
|
||||||
return QskAspect::Horizontal;
|
|
||||||
|
|
||||||
case Qsk::TopToBottom:
|
|
||||||
case Qsk::BottomToTop:
|
|
||||||
return QskAspect::Vertical;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return Inherited::effectivePlacement();
|
return Inherited::effectivePlacement();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user