Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
menu-set-tooltips-shift-icons.cpp File Reference

Go over a widget representing a menu, & set tooltips on its items from app label-to-tooltip map. More...

Go to the source code of this file.

Functions

static Glib::ustring find_label (Gtk::Widget &parent)
 
bool set_tooltips_and_shift_icons (Gtk::Widget &menu, bool const shift_icons)
 Go over a widget representing a menu, & set tooltips on its items from app label-to-tooltip map.
 

Detailed Description

Go over a widget representing a menu, & set tooltips on its items from app label-to-tooltip map.

Optionally (per Preference) shift Gtk::MenuItems with icons to align with Toggle & Radio buttons

Definition in file menu-set-tooltips-shift-icons.cpp.

Function Documentation

◆ find_label()

static Glib::ustring find_label ( Gtk::Widget &  parent)
static

◆ set_tooltips_and_shift_icons()

bool set_tooltips_and_shift_icons ( Gtk::Widget &  menu,
bool const  shift_icons 
)

Go over a widget representing a menu, & set tooltips on its items from app label-to-tooltip map.

Parameters
shift_iconsIf true: Install CSS to shift icons into the space reserved for toggles (i.e. check and radio items). The CSS will apply to all menu icons but is updated as each menu is shown.
Returns
whether icons were shifted during this or an inner recursive call

Definition at line 61 of file menu-set-tooltips-shift-icons.cpp.

References Inkscape::UI::_continue, child, Inkscape::UI::for_each_child(), InkscapeApplication::instance(), label, and set_tooltips_and_shift_icons().

Referenced by ContextMenu::ContextMenu(), InkscapeWindow::InkscapeWindow(), and set_tooltips_and_shift_icons().