mirror of
https://gitlab.com/eql/lqml.git
synced 2025-12-06 02:30:38 -08:00
example 'cl-repl': simplify QML item model
This commit is contained in:
parent
0446628830
commit
e10f319e93
4 changed files with 20 additions and 20 deletions
|
|
@ -49,9 +49,9 @@
|
|||
|
||||
(defun append-debug-output (text color bold)
|
||||
(qjs |appendOutput| ui:*debug-model*
|
||||
(list :m-text text
|
||||
:m-color color
|
||||
:m-bold bold)))
|
||||
(list :text text
|
||||
:color color
|
||||
:bold bold)))
|
||||
|
||||
(defun debug-dialog (messages)
|
||||
(qrun*
|
||||
|
|
|
|||
|
|
@ -694,11 +694,11 @@
|
|||
:rich-text (text is subset of html). The ouput is printed immediately
|
||||
(important for longer running tasks)."
|
||||
(qjs |appendOutput| ui:*output-model*
|
||||
(list :m-text (if (stringp x) x (prin1-to-string x))
|
||||
:m-color color
|
||||
:m-bold bold
|
||||
:m-line line
|
||||
:m-rich-text rich-text)))
|
||||
(list :text (if (stringp x) x (prin1-to-string x))
|
||||
:color color
|
||||
:bold bold
|
||||
:line line
|
||||
:rich-text rich-text)))
|
||||
|
||||
(qml::alias pr append-output)
|
||||
|
||||
|
|
|
|||
|
|
@ -65,9 +65,9 @@ Rectangle {
|
|||
textFormat: Text.PlainText
|
||||
font.pixelSize: 16
|
||||
font.family: "Hack"
|
||||
font.bold: mBold
|
||||
text: mText
|
||||
color: mColor
|
||||
font.bold: model.bold
|
||||
text: model.text
|
||||
color: model.color
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -287,7 +287,7 @@ StackView {
|
|||
delegate: Column {
|
||||
Rectangle {
|
||||
width: output.contentWidth
|
||||
height: mLine ? 2 : 0
|
||||
height: model.line ? 2 : 0
|
||||
color: "#c0c0ff"
|
||||
}
|
||||
|
||||
|
|
@ -297,10 +297,10 @@ StackView {
|
|||
textFormat: Text.PlainText
|
||||
font.family: output.fontFamily
|
||||
font.pixelSize: output.fontSize
|
||||
text: mRichText ? "" : mText
|
||||
color: mColor
|
||||
font.bold: mBold
|
||||
visible: !mRichText
|
||||
text: model.richText ? "" : model.text
|
||||
color: model.color
|
||||
font.bold: model.bold
|
||||
visible: !model.richText
|
||||
}
|
||||
|
||||
Text {
|
||||
|
|
@ -309,10 +309,10 @@ StackView {
|
|||
textFormat: Text.RichText
|
||||
font.family: output.fontFamily
|
||||
font.pixelSize: output.fontSize
|
||||
text: mRichText ? mText : ""
|
||||
color: mColor
|
||||
font.bold: mBold
|
||||
visible: mRichText
|
||||
text: model.richText ? model.text : ""
|
||||
color: model.color
|
||||
font.bold: model.bold
|
||||
visible: model.richText
|
||||
|
||||
MouseArea {
|
||||
width: parent.paintedWidth
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue