Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
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
// Qt-Security score:significant reason:default
4
5
#
include
<
QtGui
/
private
/
qfont_p
.
h
>
6
7
#
include
"qquicklayoutstyleinfo_p.h"
8
9
10
QT_BEGIN_NAMESPACE
11
12
QQuickLayoutStyleInfo::QQuickLayoutStyleInfo()
13
{
14
}
15
16
qreal QQuickLayoutStyleInfo::spacing(Qt::Orientation
/*orientation*/
)
const
17
{
18
#
if
defined
(
Q_OS_ANDROID
)
||
defined
(
Q_OS_IOS
)
||
defined
(
Q_OS_QNX
)
19
// On Android and iOS the default spacing between each UI element is 8dp
20
qreal spacing = 8.0;
21
#
else
22
qreal spacing = 5.0;
23
#
endif
24
25
#
ifndef
Q_OS_MACOS
26
// On OS X the DPI is always 72 so we should not scale it
27
spacing = qRound(spacing * (qreal(qt_defaultDpiX()) / 96.0));
28
#
endif
29
30
return
spacing;
31
}
32
33
qreal QQuickLayoutStyleInfo::windowMargin(Qt::Orientation
/*orientation*/
)
const
34
{
35
return
0;
36
}
37
38
bool
QQuickLayoutStyleInfo::hasChangedCore()
const
39
{
40
// never changes
41
return
false
;
42
}
43
44
QT_END_NAMESPACE
QPlatformGraphicsBufferHelper
\inmodule QtGui
qtdeclarative
src
quicklayouts
qquicklayoutstyleinfo.cpp
Generated on
for Qt by
1.14.0