Console
* Add hover events * Add copypaste events
This commit is contained in:
parent
acf68b0b26
commit
d5178bd741
@ -627,13 +627,13 @@ screen console:
|
|||||||
$ info = f"{{size=-2}}{{color=#ffffff80}}{timestamp}{{/color}}{{color=#228b22}}{stdout}{{/color}}{{/size}}"
|
$ info = f"{{size=-2}}{{color=#ffffff80}}{timestamp}{{/color}}{{color=#228b22}}{stdout}{{/color}}{{/size}}"
|
||||||
|
|
||||||
if entry.command is not None:
|
if entry.command is not None:
|
||||||
text "[info!i][entry.command!q]" style "console_command_text"
|
textbutton "[info!i][entry.command!q]" style "console_command" action [CopyToClipboard(entry.command), Notify("Copied to clipboard.")]
|
||||||
|
|
||||||
if entry.result is not None:
|
if entry.result is not None:
|
||||||
if entry.is_error:
|
if entry.is_error:
|
||||||
text "[info!i]{unicode}➥{/unicode} [entry.result!q]" style "console_error_text"
|
textbutton "[info!i]{unicode}➥{/unicode} [entry.result!q]" style "console_error" action [CopyToClipboard(entry.result), Notify("Copied to clipboard.")]
|
||||||
else:
|
else:
|
||||||
text "[info!i]{unicode}➥{/unicode} [entry.result!q]" style "console_result_text"
|
textbutton "[info!i]{unicode}➥{/unicode} [entry.result!q]" style "console_result" action [CopyToClipboard(entry.result), Notify("Copied to clipboard.")]
|
||||||
|
|
||||||
hbox:
|
hbox:
|
||||||
text "Command:"
|
text "Command:"
|
||||||
@ -653,6 +653,14 @@ style console_text:
|
|||||||
font "gui/creamy_pumpkin_pie/fonts/Hack-Regular.ttf"
|
font "gui/creamy_pumpkin_pie/fonts/Hack-Regular.ttf"
|
||||||
adjust_spacing False
|
adjust_spacing False
|
||||||
|
|
||||||
|
style console_line_button is empty:
|
||||||
|
xfill True
|
||||||
|
hover_background "#ffffff25"
|
||||||
|
|
||||||
|
style console_command is console_line_button
|
||||||
|
style console_error is console_line_button
|
||||||
|
style console_result is console_line_button
|
||||||
|
|
||||||
style console_button_text is console_text
|
style console_button_text is console_text
|
||||||
|
|
||||||
style console_command_text is console_text
|
style console_command_text is console_text
|
||||||
|
Loading…
Reference in New Issue
Block a user