mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 20:55:54 +08:00
Use new scrollbar with QtControls 2 scroll view
A bit confusing that you have to set the parent and position manually, but okay. Contributes to issue CURA-8686.
This commit is contained in:
parent
10303c10f9
commit
7bda1336da
@ -1,10 +1,10 @@
|
|||||||
// Copyright (c) 2019 Ultimaker B.V.
|
// Copyright (c) 2022 Ultimaker B.V.
|
||||||
// Cura is released under the terms of the LGPLv3 or higher.
|
// Cura is released under the terms of the LGPLv3 or higher.
|
||||||
|
|
||||||
import QtQuick 2.10
|
import QtQuick 2.10
|
||||||
import QtQuick.Controls 2.3
|
import QtQuick.Controls 2.3
|
||||||
|
|
||||||
import UM 1.3 as UM
|
import UM 1.5 as UM
|
||||||
import Cura 1.1 as Cura
|
import Cura 1.1 as Cura
|
||||||
|
|
||||||
|
|
||||||
@ -13,12 +13,26 @@ import Cura 1.1 as Cura
|
|||||||
//
|
//
|
||||||
ScrollView
|
ScrollView
|
||||||
{
|
{
|
||||||
|
id: scrollableTextAreaBase
|
||||||
property alias textArea: _textArea
|
property alias textArea: _textArea
|
||||||
|
|
||||||
property var back_color: UM.Theme.getColor("main_background")
|
property var back_color: UM.Theme.getColor("main_background")
|
||||||
property var do_borders: true
|
property var do_borders: true
|
||||||
|
|
||||||
clip: true
|
clip: true
|
||||||
|
ScrollBar.vertical: UM.ScrollBar
|
||||||
|
{
|
||||||
|
parent: scrollableTextAreaBase
|
||||||
|
anchors
|
||||||
|
{
|
||||||
|
right: parent.right
|
||||||
|
rightMargin: parent.background.border.width
|
||||||
|
top: parent.top
|
||||||
|
topMargin: rightMargin
|
||||||
|
bottom: parent.bottom
|
||||||
|
bottomMargin: rightMargin
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
background: Rectangle // Border
|
background: Rectangle // Border
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user