Merge branch 'development' into cmake/warn_virtual
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
@@ -2461,6 +2461,18 @@ namespace AzQtComponents
|
||||
placeholderRect.translate(0, -margins.bottom());
|
||||
}
|
||||
|
||||
// Also adjust the placeholderRect by the relative dpi change from the original screen, since setGeometry uses the screen's
|
||||
// virtualGeometry!
|
||||
QScreen* fromScreen = dock->screen();
|
||||
QScreen* toScreen = Utilities::ScreenAtPoint(placeholderRect.topLeft());
|
||||
|
||||
if (fromScreen != toScreen)
|
||||
{
|
||||
qreal factorRatio = QHighDpiScaling::factor(fromScreen) / QHighDpiScaling::factor(toScreen);
|
||||
placeholderRect.setWidth(aznumeric_cast<int>(aznumeric_cast<qreal>(placeholderRect.width()) * factorRatio));
|
||||
placeholderRect.setHeight(aznumeric_cast<int>(aznumeric_cast<qreal>(placeholderRect.height()) * factorRatio));
|
||||
}
|
||||
|
||||
// Place the floating dock widget
|
||||
makeDockWidgetFloating(dock, placeholderRect);
|
||||
clearDraggingState();
|
||||
|
||||
@@ -169,6 +169,10 @@ namespace AzQtComponents
|
||||
initializeSearchPaths(application, engineRootPath);
|
||||
initializeFonts();
|
||||
|
||||
QFont defaultFont("Open Sans");
|
||||
defaultFont.setPixelSize(12);
|
||||
QApplication::setFont(defaultFont);
|
||||
|
||||
m_titleBarOverdrawHandler = TitleBarOverdrawHandler::createHandler(application, this);
|
||||
|
||||
// The window decoration wrappers require the titlebar overdraw handler
|
||||
|
||||
Reference in New Issue
Block a user