Skip to content
Snippets Groups Projects
Commit 34a7c0c7 authored by Jarrad Whitaker's avatar Jarrad Whitaker Committed by Jean-Baptiste Kempf
Browse files

Qt: space the toolbar items depending on the DPI


Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent a59edbf5
No related branches found
No related tags found
No related merge requests found
......@@ -167,14 +167,15 @@ void AbstractController::createAndAddWidget( QBoxLayout *controlLayout_,
buttonGroupLayout = NULL;
}
qreal scalingFactorX = static_cast<qreal>(logicalDpiX())/DPI_REF_VALUE;
/* Special case for SPACERS, who aren't QWidgets */
if( i_type == WIDGET_SPACER )
{
controlLayout_->addSpacing( 12 );
controlLayout_->addSpacing( static_cast<int>(12*scalingFactorX) );
}
else if( i_type == WIDGET_SPACER_EXTEND )
{
controlLayout_->addStretch( 12 );
controlLayout_->addStretch( static_cast<int>(12*scalingFactorX) );
}
else
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment