mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-25 15:44:04 -06:00
Merge pull request #16509 from Ultimaker/CURA-9374_make_long_messages_scrollable
CURA-9374 Add scrollable area around text messages
This commit is contained in:
commit
45b2dd1d64
1 changed files with 4 additions and 34 deletions
|
@ -4,41 +4,11 @@
|
||||||
import QtQuick 2.10
|
import QtQuick 2.10
|
||||||
import QtQuick.Controls 2.3
|
import QtQuick.Controls 2.3
|
||||||
|
|
||||||
import UM 1.5 as UM
|
import UM 1.7 as UM
|
||||||
import Cura 1.1 as Cura
|
import Cura 1.1 as Cura
|
||||||
|
|
||||||
|
|
||||||
//
|
// Wrapper to UM.ScrollableTextArea which was originally placed here
|
||||||
// Cura-style TextArea with scrolls
|
UM.ScrollableTextArea
|
||||||
//
|
|
||||||
Flickable
|
|
||||||
{
|
{
|
||||||
id: scrollableTextAreaBase
|
}
|
||||||
property bool do_borders: true
|
|
||||||
property var back_color: UM.Theme.getColor("main_background")
|
|
||||||
property alias textArea: flickableTextArea
|
|
||||||
|
|
||||||
ScrollBar.vertical: UM.ScrollBar {}
|
|
||||||
|
|
||||||
TextArea.flickable: TextArea
|
|
||||||
{
|
|
||||||
id: flickableTextArea
|
|
||||||
|
|
||||||
background: Rectangle //Providing the background color and border.
|
|
||||||
{
|
|
||||||
anchors.fill: parent
|
|
||||||
anchors.margins: -border.width
|
|
||||||
|
|
||||||
color: scrollableTextAreaBase.back_color
|
|
||||||
border.color: UM.Theme.getColor("thick_lining")
|
|
||||||
border.width: scrollableTextAreaBase.do_borders ? UM.Theme.getSize("default_lining").width : 0
|
|
||||||
}
|
|
||||||
|
|
||||||
font: UM.Theme.getFont("default")
|
|
||||||
color: UM.Theme.getColor("text")
|
|
||||||
textFormat: TextEdit.PlainText
|
|
||||||
renderType: Text.NativeRendering
|
|
||||||
wrapMode: Text.Wrap
|
|
||||||
selectByMouse: true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue