orientation removed from the placement bits

This commit is contained in:
Uwe Rathmann 2023-02-15 16:16:19 +01:00
parent 4c10d8b0e4
commit 454688361c
2 changed files with 1 additions and 24 deletions

View File

@ -598,8 +598,7 @@ void Editor::setupPushButton()
setFlagHint( Q::Text | Q::Disabled | A::Style, Qsk::Sunken );
setAlignment( Q::Text | A::Vertical, Qt::AlignCenter );
setAlignment( Q::Text | A::Horizontal, Qt::AlignLeft | Qt::AlignVCenter );
setAlignment( Q::Text, Qt::AlignCenter );
setColor( Q::Text, m_pal.themeForeground );
setColor( Q::Text | Q::Disabled, m_pal.darker200 );

View File

@ -14,8 +14,6 @@
#include "QskSkinlet.h"
#include "QskTextOptions.h"
#include <qfontmetrics.h>
QSK_SUBCONTROL( QskPushButton, Panel )
QSK_SUBCONTROL( QskPushButton, Ripple )
QSK_SUBCONTROL( QskPushButton, Text )
@ -229,26 +227,6 @@ void QskPushButton::updateResources()
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();
}