mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 23:17:32 -06:00
Fix flickable with custom scrollbar
A bit of a hassle with the scrollbar overlapping the background here. Contributes to issue CURA-8686.
This commit is contained in:
parent
1cc3aecd8c
commit
ae81b5e3e7
1 changed files with 26 additions and 22 deletions
|
@ -1,11 +1,11 @@
|
||||||
// Copyright (c) 2020 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 QtQuick.Layouts 1.3
|
import QtQuick.Layouts 1.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
|
||||||
|
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ UM.TooltipArea
|
||||||
renderType: Text.NativeRendering
|
renderType: Text.NativeRendering
|
||||||
}
|
}
|
||||||
|
|
||||||
ScrollView
|
Flickable
|
||||||
{
|
{
|
||||||
anchors.top: titleLabel.bottom
|
anchors.top: titleLabel.bottom
|
||||||
anchors.topMargin: UM.Theme.getSize("default_margin").height
|
anchors.topMargin: UM.Theme.getSize("default_margin").height
|
||||||
|
@ -53,26 +53,9 @@ UM.TooltipArea
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
|
|
||||||
background: Rectangle
|
ScrollBar.vertical: UM.ScrollBar {}
|
||||||
{
|
|
||||||
color: UM.Theme.getColor("main_background")
|
|
||||||
anchors.fill: parent
|
|
||||||
|
|
||||||
border.color:
|
TextArea.flickable: TextArea
|
||||||
{
|
|
||||||
if (!gcodeTextArea.enabled)
|
|
||||||
{
|
|
||||||
return UM.Theme.getColor("setting_control_disabled_border")
|
|
||||||
}
|
|
||||||
if (gcodeTextArea.hovered || gcodeTextArea.activeFocus)
|
|
||||||
{
|
|
||||||
return UM.Theme.getColor("setting_control_border_highlight")
|
|
||||||
}
|
|
||||||
return UM.Theme.getColor("setting_control_border")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
TextArea
|
|
||||||
{
|
{
|
||||||
id: gcodeTextArea
|
id: gcodeTextArea
|
||||||
|
|
||||||
|
@ -92,6 +75,27 @@ UM.TooltipArea
|
||||||
propertyProvider.setPropertyValue("value", text)
|
propertyProvider.setPropertyValue("value", text)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
background: Rectangle
|
||||||
|
{
|
||||||
|
color: UM.Theme.getColor("main_background")
|
||||||
|
anchors.fill: parent
|
||||||
|
anchors.margins: -border.width //Wrap the border around the parent.
|
||||||
|
|
||||||
|
border.color:
|
||||||
|
{
|
||||||
|
if (!gcodeTextArea.enabled)
|
||||||
|
{
|
||||||
|
return UM.Theme.getColor("setting_control_disabled_border")
|
||||||
|
}
|
||||||
|
if (gcodeTextArea.hovered || gcodeTextArea.activeFocus)
|
||||||
|
{
|
||||||
|
return UM.Theme.getColor("setting_control_border_highlight")
|
||||||
|
}
|
||||||
|
return UM.Theme.getColor("setting_control_border")
|
||||||
|
}
|
||||||
|
border.width: UM.Theme.getSize("default_lining").width
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue