Always show menu images (!32)
There is a GtkSetting [1] that controls whether images in menus are shown or not. On some distributions / desktops it is enabled by default and on others it is disabled by default. To force show images in menus set the 'always-show-image' property to true in Gtk::ImageMenuItems [2]. References: [1] Gtk3 Reference Documentation - Settings/gtk-menu-images https://developer.gnome.org/gtk3/stable/GtkSettings.html#GtkSettings--gtk-menu-images [2] Gtk3 Reference Documentation - GtkImageMenuItem https://developer.gnome.org/gtk3/stable/GtkImageMenuItem.html#gtk-image-menu-item-set-always-show-image Closes !32 - Always show menu images
This commit is contained in:
parent
d1441ce6a9
commit
56d8533add
|
@ -85,6 +85,7 @@ ImageMenuElem::ImageMenuElem(const Glib::ustring& label,
|
|||
set_image(image_widget);
|
||||
set_label(label);
|
||||
set_use_underline(true);
|
||||
set_always_show_image(true);
|
||||
|
||||
show_all();
|
||||
}
|
||||
|
@ -101,6 +102,7 @@ ImageMenuElem::ImageMenuElem(const Glib::ustring& label,
|
|||
set_image(image_widget);
|
||||
set_label(label);
|
||||
set_use_underline(true);
|
||||
set_always_show_image(true);
|
||||
|
||||
show_all();
|
||||
}
|
||||
|
@ -116,6 +118,7 @@ ImageMenuElem::ImageMenuElem(const Glib::ustring& label,
|
|||
set_image(image_widget);
|
||||
set_label(label);
|
||||
set_use_underline(true);
|
||||
set_always_show_image(true);
|
||||
|
||||
show_all();
|
||||
}
|
||||
|
@ -140,6 +143,7 @@ StockMenuElem::StockMenuElem(const Gtk::StockID& stock_id,
|
|||
|
||||
set_use_stock();
|
||||
set_label(stock_id.get_string());
|
||||
set_always_show_image(true);
|
||||
|
||||
show_all();
|
||||
}
|
||||
|
@ -159,6 +163,7 @@ StockMenuElem::StockMenuElem(const Gtk::StockID& stock_id,
|
|||
|
||||
set_use_stock();
|
||||
set_label(stock_id.get_string());
|
||||
set_always_show_image(true);
|
||||
|
||||
show_all();
|
||||
}
|
||||
|
@ -172,6 +177,7 @@ StockMenuElem::StockMenuElem(const Gtk::StockID& stock_id,
|
|||
|
||||
set_use_stock();
|
||||
set_label(stock_id.get_string());
|
||||
set_always_show_image(true);
|
||||
|
||||
show_all();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue