-
-
Notifications
You must be signed in to change notification settings - Fork 185
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #895 from Ultimaker/CURA-9374_make_long_messages_s…
…crollable Cura 9374 make long messages scrollable
- Loading branch information
Showing
3 changed files
with
52 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// Copyright (c) 2022 Ultimaker B.V. | ||
// Uranium is released under the terms of the LGPLv3 or higher. | ||
|
||
import QtQuick 2.10 | ||
import QtQuick.Controls 2.3 | ||
import UM 1.7 as UM | ||
|
||
//TextArea with scrolls that uses our own theme. | ||
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 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters