forked from qt-creator/qt-creator
QmlDesigner: Cleanup HelperWidgets ScrollBars
Change-Id: Ifc49b0a8c629cb6ed65851a782fe1280079b4a5e Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
committed by
Henning Gründl
parent
a6a8a094c5
commit
04ebd7b9c3
@@ -1,9 +1,9 @@
|
||||
// Copyright (C) 2020 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Controls.Basic 2.15
|
||||
import StudioTheme 1.0 as StudioTheme
|
||||
import QtQuick
|
||||
import QtQuick.Controls.Basic
|
||||
import StudioTheme as StudioTheme
|
||||
|
||||
ScrollBar {
|
||||
id: scrollBar
|
||||
@@ -13,9 +13,10 @@ ScrollBar {
|
||||
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
|
||||
implicitContentHeight + topPadding + bottomPadding)
|
||||
|
||||
|
||||
property bool scrollBarVisible: parent.childrenRect.width > parent.width
|
||||
|
||||
minimumSize: orientation == Qt.Horizontal ? height / width : width / height
|
||||
|
||||
orientation: Qt.Horizontal
|
||||
policy: scrollBar.scrollBarVisible ? ScrollBar.AlwaysOn : ScrollBar.AlwaysOff
|
||||
x: 0
|
||||
@@ -24,8 +25,6 @@ ScrollBar {
|
||||
- (parent.bothVisible ? parent.verticalThickness : 0)
|
||||
padding: 0
|
||||
|
||||
minimumSize: orientation == Qt.Horizontal ? height / width : width / height
|
||||
|
||||
background: Rectangle {
|
||||
color: StudioTheme.Values.themeScrollBarTrack
|
||||
}
|
||||
|
@@ -1,9 +1,9 @@
|
||||
// Copyright (C) 2020 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Controls.Basic 2.15
|
||||
import StudioTheme 1.0 as StudioTheme
|
||||
import QtQuick
|
||||
import QtQuick.Controls.Basic
|
||||
import StudioTheme as StudioTheme
|
||||
|
||||
ScrollBar {
|
||||
id: scrollBar
|
||||
|
Reference in New Issue
Block a user