Respect panel's padding
This commit is contained in:
parent
684f9c91da
commit
87bfa8611f
@ -792,6 +792,8 @@ void Editor::setupDialogButtonBox()
|
|||||||
void Editor::setupDrawer() {
|
void Editor::setupDrawer() {
|
||||||
using Q = QskDrawer;
|
using Q = QskDrawer;
|
||||||
|
|
||||||
|
setPadding( Q::Panel, 5_dp );
|
||||||
|
setGradient( Q::Panel, m_pal.background );
|
||||||
setAnimation( Q::Panel | QskAspect::Position, qskDuration );
|
setAnimation( Q::Panel | QskAspect::Position, qskDuration );
|
||||||
setHint( Q::Overlay | QskAspect::Style, false );
|
setHint( Q::Overlay | QskAspect::Style, false );
|
||||||
}
|
}
|
||||||
|
@ -736,6 +736,8 @@ void Editor::setupDialogButtonBox()
|
|||||||
void Editor::setupDrawer() {
|
void Editor::setupDrawer() {
|
||||||
using Q = QskDrawer;
|
using Q = QskDrawer;
|
||||||
|
|
||||||
|
setPadding( Q::Panel, 5 );
|
||||||
|
setGradient( Q::Panel, m_pal.darker125 );
|
||||||
setAnimation( Q::Panel | QskAspect::Position, qskDuration );
|
setAnimation( Q::Panel | QskAspect::Position, qskDuration );
|
||||||
setHint( Q::Overlay | QskAspect::Style, false );
|
setHint( Q::Overlay | QskAspect::Style, false );
|
||||||
}
|
}
|
||||||
|
@ -65,7 +65,9 @@ void QskDrawer::setContent( QskControl* content ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void QskDrawer::updateLayout() {
|
void QskDrawer::updateLayout() {
|
||||||
const auto& contentSize = m_data->content->preferredSize();
|
const auto& padding = paddingHint( Panel );
|
||||||
|
const auto& contentSize = m_data->content->preferredSize()
|
||||||
|
.grownBy( padding );
|
||||||
const auto& parentSize = parentItem()->size();
|
const auto& parentSize = parentItem()->size();
|
||||||
|
|
||||||
switch( m_data->edge ) {
|
switch( m_data->edge ) {
|
||||||
@ -111,7 +113,8 @@ void QskDrawer::updateLayout() {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
m_data->content->setGeometry( QPointF(), m_data->contentBox->size() );
|
m_data->content->setGeometry( QPointF( padding.left(), padding.top() ),
|
||||||
|
m_data->contentBox->size().shrunkBy( padding ) );
|
||||||
|
|
||||||
Inherited::updateLayout();
|
Inherited::updateLayout();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user