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)
|
(defun append-debug-output (text color bold)
|
||||||
(qjs |appendOutput| ui:*debug-model*
|
(qjs |appendOutput| ui:*debug-model*
|
||||||
(list :m-text text
|
(list :text text
|
||||||
:m-color color
|
:color color
|
||||||
:m-bold bold)))
|
:bold bold)))
|
||||||
|
|
||||||
(defun debug-dialog (messages)
|
(defun debug-dialog (messages)
|
||||||
(qrun*
|
(qrun*
|
||||||
|
|
|
||||||
|
|
@ -694,11 +694,11 @@
|
||||||
:rich-text (text is subset of html). The ouput is printed immediately
|
:rich-text (text is subset of html). The ouput is printed immediately
|
||||||
(important for longer running tasks)."
|
(important for longer running tasks)."
|
||||||
(qjs |appendOutput| ui:*output-model*
|
(qjs |appendOutput| ui:*output-model*
|
||||||
(list :m-text (if (stringp x) x (prin1-to-string x))
|
(list :text (if (stringp x) x (prin1-to-string x))
|
||||||
:m-color color
|
:color color
|
||||||
:m-bold bold
|
:bold bold
|
||||||
:m-line line
|
:line line
|
||||||
:m-rich-text rich-text)))
|
:rich-text rich-text)))
|
||||||
|
|
||||||
(qml::alias pr append-output)
|
(qml::alias pr append-output)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -65,9 +65,9 @@ Rectangle {
|
||||||
textFormat: Text.PlainText
|
textFormat: Text.PlainText
|
||||||
font.pixelSize: 16
|
font.pixelSize: 16
|
||||||
font.family: "Hack"
|
font.family: "Hack"
|
||||||
font.bold: mBold
|
font.bold: model.bold
|
||||||
text: mText
|
text: model.text
|
||||||
color: mColor
|
color: model.color
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -287,7 +287,7 @@ StackView {
|
||||||
delegate: Column {
|
delegate: Column {
|
||||||
Rectangle {
|
Rectangle {
|
||||||
width: output.contentWidth
|
width: output.contentWidth
|
||||||
height: mLine ? 2 : 0
|
height: model.line ? 2 : 0
|
||||||
color: "#c0c0ff"
|
color: "#c0c0ff"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -297,10 +297,10 @@ StackView {
|
||||||
textFormat: Text.PlainText
|
textFormat: Text.PlainText
|
||||||
font.family: output.fontFamily
|
font.family: output.fontFamily
|
||||||
font.pixelSize: output.fontSize
|
font.pixelSize: output.fontSize
|
||||||
text: mRichText ? "" : mText
|
text: model.richText ? "" : model.text
|
||||||
color: mColor
|
color: model.color
|
||||||
font.bold: mBold
|
font.bold: model.bold
|
||||||
visible: !mRichText
|
visible: !model.richText
|
||||||
}
|
}
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
|
|
@ -309,10 +309,10 @@ StackView {
|
||||||
textFormat: Text.RichText
|
textFormat: Text.RichText
|
||||||
font.family: output.fontFamily
|
font.family: output.fontFamily
|
||||||
font.pixelSize: output.fontSize
|
font.pixelSize: output.fontSize
|
||||||
text: mRichText ? mText : ""
|
text: model.richText ? model.text : ""
|
||||||
color: mColor
|
color: model.color
|
||||||
font.bold: mBold
|
font.bold: model.bold
|
||||||
visible: mRichText
|
visible: model.richText
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
width: parent.paintedWidth
|
width: parent.paintedWidth
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue