[gparted] Always show menu images (!32)



commit 56d8533addbfb2642fb77d17360f9c41f1eaa254
Author: Luca Bacci <luca bacci982 gmail com>
Date:   Tue Mar 26 10:50:54 2019 +0100

    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

 src/MenuHelpers.cc | 6 ++++++
 1 file changed, 6 insertions(+)
---
diff --git a/src/MenuHelpers.cc b/src/MenuHelpers.cc
index feec5fed..722bd4cd 100644
--- a/src/MenuHelpers.cc
+++ b/src/MenuHelpers.cc
@@ -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();
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]