* Add hover events
* Add copypaste events
This commit is contained in:
LoafyLemon 2024-05-18 21:43:01 +01:00
parent acf68b0b26
commit d5178bd741

View File

@ -627,13 +627,13 @@ screen console:
$ info = f"{{size=-2}}{{color=#ffffff80}}{timestamp}{{/color}}{{color=#228b22}}{stdout}{{/color}}{{/size}}"
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.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:
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:
text "Command:"
@ -653,6 +653,14 @@ style console_text:
font "gui/creamy_pumpkin_pie/fonts/Hack-Regular.ttf"
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_command_text is console_text