Re: bitmap in button doesn't appear in 64bit 9.10
- From: Tadej BorovÅak <tadeboro gmail com>
- To: "Garth's KidStuff" <garthskidstuff gmail com>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: bitmap in button doesn't appear in 64bit 9.10
- Date: Tue, 19 Jan 2010 18:35:50 +0100
Hello.
The following code works great in 32 bit and 64bit <= 9.04, but no bitmap
appears when I run in 64bit 9.10.
 ÂGtk::Image* img = NULL;
 Âif (btnImageName.length() > 0)
 Â{
   Âcppstring path = GUtils::OSGetIconFolder() + btnImageName + L".png";
   Âimg = new
Gtk::Image(GTextUtils::ConvertUTF16WideStringToUTF8String(path));
 Â}
 ÂGtk::Button* btn = new Gtk::Button;
 Âif (img != NULL)
 Â{
   Âbtn->set_image(*img);
   Âbtn->set_image_position(Gtk::POS_LEFT);
 Â}
 Âbtn->set_alignment(0.0, 0.5);
 Âbtn->signal_clicked().connect(sigc::bind(sigc::mem_fun(this,
&LXLiveReadoutManager::ToggleSourceWindow), sourceID));
 Âm_ButtonMap[sourceID] = btn;
 Âm_ButtonBox->add(*btn);
 Âm_ButtonBox->show_all();
I think this is Ubuntu's "fault". They decided to reduce visual
clutter and trim images from menu items, buttons, etc. by default.
User can change this by setting "gtk-button-images" and
"gtk-menu-images" GtkSettings to TRUE, but I cannot help you with GUI
tools, since I don't use Ubuntu or GNOME.
Tadej
--
Tadej BorovÅak
tadeboro.blogspot.com
tadeboro gmail com
tadej borovsak gmail com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]