diff options
| author | Alexander Valavanis <valavanisalex@gmail.com> | 2019-01-27 11:53:05 +0000 |
|---|---|---|
| committer | Alexander Valavanis <valavanisalex@gmail.com> | 2019-01-27 11:53:05 +0000 |
| commit | cdb5052c77519ed176427244a41873b59733a4f9 (patch) | |
| tree | 8a37822b205b3297f3824239d0d0b259ac81aad4 /src/ui | |
| parent | Merge branch 'master' of gitlab.com:inkscape/inkscape (diff) | |
| download | inkscape-cdb5052c77519ed176427244a41873b59733a4f9.tar.gz inkscape-cdb5052c77519ed176427244a41873b59733a4f9.zip | |
Toolbars: Fix alt+x focus switching
Diffstat (limited to 'src/ui')
| -rw-r--r-- | src/ui/toolbar/rect-toolbar.cpp | 2 | ||||
| -rw-r--r-- | src/ui/tools/rect-tool.cpp | 2 | ||||
| -rw-r--r-- | src/ui/tools/select-tool.cpp | 2 | ||||
| -rw-r--r-- | src/ui/widget/spin-button-tool-item.cpp | 10 | ||||
| -rw-r--r-- | src/ui/widget/spin-button-tool-item.h | 1 |
5 files changed, 13 insertions, 4 deletions
diff --git a/src/ui/toolbar/rect-toolbar.cpp b/src/ui/toolbar/rect-toolbar.cpp index 7841f182e..e4caae189 100644 --- a/src/ui/toolbar/rect-toolbar.cpp +++ b/src/ui/toolbar/rect-toolbar.cpp @@ -109,7 +109,6 @@ RectToolbar::RectToolbar(SPDesktop *desktop) // holder->_width_action = create_adjustment_action( "RectWidthAction", // _("Width"), _("W:"), - // TRUE, "altx-rect", // labels, values, G_N_ELEMENTS(labels), } @@ -132,7 +131,6 @@ RectToolbar::RectToolbar(SPDesktop *desktop) _height_item->set_sensitive(false); // holder->_height_action = create_adjustment_action( "RectHeightAction", - // FALSE, nullptr, // labels, values, G_N_ELEMENTS(labels), } diff --git a/src/ui/tools/rect-tool.cpp b/src/ui/tools/rect-tool.cpp index 4000e4924..fdb7bace9 100644 --- a/src/ui/tools/rect-tool.cpp +++ b/src/ui/tools/rect-tool.cpp @@ -283,7 +283,7 @@ bool RectTool::root_handler(GdkEvent* event) { case GDK_KEY_x: case GDK_KEY_X: if (MOD__ALT_ONLY(event)) { - desktop->setToolboxFocusTo ("altx-rect"); + desktop->setToolboxFocusTo("rect-width"); ret = TRUE; } break; diff --git a/src/ui/tools/select-tool.cpp b/src/ui/tools/select-tool.cpp index a630f06a7..01ede4b6d 100644 --- a/src/ui/tools/select-tool.cpp +++ b/src/ui/tools/select-tool.cpp @@ -1032,7 +1032,7 @@ bool SelectTool::root_handler(GdkEvent* event) { case GDK_KEY_x: case GDK_KEY_X: if (MOD__ALT_ONLY(event)) { - desktop->setToolboxFocusTo ("altx"); + desktop->setToolboxFocusTo ("select-x"); ret = TRUE; } break; diff --git a/src/ui/widget/spin-button-tool-item.cpp b/src/ui/widget/spin-button-tool-item.cpp index 2276b161d..cb6767445 100644 --- a/src/ui/widget/spin-button-tool-item.cpp +++ b/src/ui/widget/spin-button-tool-item.cpp @@ -354,6 +354,7 @@ SpinButtonToolItem::SpinButtonToolItem(const Glib::ustring name, { set_margin_start(3); set_margin_end(3); + set_name(_name); // Handle button events auto btn_focus_in_event_cb = sigc::mem_fun(*this, &SpinButtonToolItem::on_btn_focus_in_event); @@ -380,6 +381,15 @@ SpinButtonToolItem::SpinButtonToolItem(const Glib::ustring name, } /** + * \brief Transfers focus to the child spinbutton by default + */ +void +SpinButtonToolItem::on_grab_focus() +{ + grab_button_focus(); +} + +/** * \brief Set the tooltip to display on this (and all child widgets) * * \param[in] text The tooltip to display diff --git a/src/ui/widget/spin-button-tool-item.h b/src/ui/widget/spin-button-tool-item.h index cc48e453b..2df2024d3 100644 --- a/src/ui/widget/spin-button-tool-item.h +++ b/src/ui/widget/spin-button-tool-item.h @@ -49,6 +49,7 @@ private: protected: bool on_create_menu_proxy() override; + void on_grab_focus() override; public: SpinButtonToolItem(const Glib::ustring name, |
