From a44daca7ad25e041c42509db198161dd9336b31e Mon Sep 17 00:00:00 2001 From: Kevin Langley Date: Fri, 22 Nov 2024 13:54:32 +0000 Subject: [PATCH] Switch centre graphic button to clickable text style --- nion/swift/Inspector.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/nion/swift/Inspector.py b/nion/swift/Inspector.py index aa735403..79e570d4 100755 --- a/nion/swift/Inspector.py +++ b/nion/swift/Inspector.py @@ -2864,7 +2864,10 @@ def __init__(self, document_controller: DocumentController.DocumentController, u.create_spacing(12), u.create_check_box(text=_("Shape"), checked="@binding(_lock_shape_model.value)", text_alignment_vertical="center"), u.create_stretch(), - u.create_push_button(text="\N{BULLSEYE}", on_clicked="_move_to_center_clicked", width=26, text_alignment_horizontal="center"), + {"type": "nionswift.text_push_button", + "text": "\N{BULLSEYE}", + "on_button_clicked": "_move_to_center_clicked", + "tool_tip": "Center graphic."}, u.create_spacing(4) ) @@ -3183,7 +3186,7 @@ def __create_ring_shape_and_pos(self) -> Declarative.UIDescriptionResult: spacing=4 ) - def _move_to_center_clicked(self, widget: typing.Any) -> None: + def _move_to_center_clicked(self) -> None: action_context = self.__document_controller._get_action_context() self.__document_controller.perform_action_in_context("display_panel.center_graphics", action_context)