DefaultFrame.qml 1.3 KB

123456789101112131415161718192021222324252627282930313233
  1. // Copyright (C) 2020 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. import QtQuick
  5. import QtQuick.Controls
  6. import QtQuick.Templates as T
  7. import QtQuick.NativeStyle as NativeStyle
  8. T.Frame {
  9. id: control
  10. readonly property bool __nativeBackground: background instanceof NativeStyle.StyleItem
  11. readonly property bool __notCustomizable: true
  12. implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
  13. contentWidth + leftPadding + rightPadding)
  14. implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
  15. contentHeight + topPadding + bottomPadding)
  16. leftPadding: __nativeBackground ? background.contentPadding.left : 12
  17. rightPadding: __nativeBackground ? background.contentPadding.right : 12
  18. topPadding: __nativeBackground ? background.contentPadding.top : 12
  19. bottomPadding: __nativeBackground ? background.contentPadding.bottom : 12
  20. background: NativeStyle.Frame {
  21. control: control
  22. contentWidth: control.contentWidth
  23. contentHeight: control.contentHeight
  24. readonly property bool __ignoreNotCustomizable: true
  25. }
  26. }