Commit 34a7c0c7 authored by Jarrad Whitaker's avatar Jarrad Whitaker Committed by Jean-Baptiste Kempf

Qt: space the toolbar items depending on the DPI

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