cinterfacegtkmenuitemgtkbuilder

GtkMenuItem - Empty space on the sides


I recently read that GtkImageMenuItem got deprecated and thus tried to create something similar following the advice of the GTK+ documentation of creating a GtkBox inside the GtkMenuItem and putting a GtkImage and a GtkLabel inside of that box.

It seems working, however, there is some space before the image and after the label I can't figure out how to remove.

Please see this picture

Here is my approach in XML so far (I'm using GtkBuilder):

<object class="GtkMenuItem" id="item_connect">
    <property name="visible">True</property>
    <child>
        <object class="GtkBox">
            <property name="visible">True</property>
            <child>
                <object class="GtkImage">
                    <property name="visible">True</property>
                    <property name="icon-name">gtk-connect</property>                                                               
                </object>
            </child>
            <child>
                <object class="GtkLabel">      
                    <property name="visible">True</property>
                    <property name="label">Connect</property>
                </object>
            </child>                                            
        </object>
    </child>
</object>

Thank you for your help!


Solution

  • Found it: it was the reserve-toggle-size property. I set it to false and thus the space gone.