Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qquicklayoutstyleinfo.cpp
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#include <QtGui/private/qfont_p.h>
5
7
8
10
14
16{
17#if defined(Q_OS_ANDROID) || defined(Q_OS_IOS) || defined(Q_OS_QNX)
18 // On Android and iOS the default spacing between each UI element is 8dp
19 qreal spacing = 8.0;
20#else
21 qreal spacing = 5.0;
22#endif
23
24#ifndef Q_OS_MACOS
25 // On OS X the DPI is always 72 so we should not scale it
26 spacing = qRound(spacing * (qreal(qt_defaultDpiX()) / 96.0));
27#endif
28
29 return spacing;
30}
31
33{
34 return 0;
35}
36
38{
39 // never changes
40 return false;
41}
42
44
qreal spacing(Qt::Orientation orientation) const override
qreal windowMargin(Qt::Orientation orientation) const override
bool hasChangedCore() const override
qreal spacing
Combined button and popup list for selecting options.
Orientation
Definition qnamespace.h:98
int qRound(qfloat16 d) noexcept
Definition qfloat16.h:327
Q_GUI_EXPORT int qt_defaultDpiX()
Definition qfont.cpp:110
double qreal
Definition qtypes.h:187