Skip to content

Commit

Permalink
chore: beautify debug info
Browse files Browse the repository at this point in the history
  • Loading branch information
dynobo committed Apr 20, 2024
1 parent 2379b03 commit cfad076
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions keyhint/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -521,8 +521,8 @@ def on_debug_action(self, _: Gio.SimpleAction, __: None) -> None:
def _on_copy_clicked(button: Gtk.Button) -> None:
if display := Gdk.Display.get_default():
clipboard = display.get_clipboard()
clipboard.set(f"### Debug Info:\n```{label.get_text()}```")
button.set_icon_name("checkmark")
clipboard.set(f"### Debug Info\n\n```\n{label.get_text().strip()}\n```")
button.set_icon_name("object-select-symbolic")
button.set_tooltip_text("Copied!")

copy_button = Gtk.Button()
Expand Down Expand Up @@ -667,7 +667,7 @@ def get_appropriate_sheet_id(self) -> str:
def bind_shortcuts_callback(
self,
_: Gtk.SignalListItemFactory,
item, # type: ignore # ONHOLD: Gtk.ColumnViewCell for GTK 4.12+
item, # noqa: ANN001 # ONHOLD: Gtk.ColumnViewCell for GTK 4.12+
) -> None:
row = cast(binding.Row, item.get_item())
shortcut = binding.create_shortcut(row.shortcut)
Expand All @@ -680,7 +680,7 @@ def bind_shortcuts_callback(
def bind_labels_callback(
self,
_: Gtk.SignalListItemFactory,
item, # type: ignore # ONHOLD: Gtk.ColumnViewCell for GTK 4.12+
item, # noqa: ANN001 # ONHOLD: Gtk.ColumnViewCell for GTK 4.12+
) -> None:
row = cast(binding.Row, item.get_item())
if row.shortcut:
Expand Down

0 comments on commit cfad076

Please sign in to comment.