Hello, Once you add the image to chrome/app/theme/, and then modify the theme_resource.rc file for adding the image data resource:
IDR_MYBUTTON BINDATA "my-button.png" You can need to use the ResourceBundle to get that image and assign it to the Button SetImage method. ResourceBundle rb* = ResourceBundle::GetSharedInstance(); SkBitmap *image = rb->GetBitmapNamed(IDR_MYBUTTON) Good Luck On Sun, Dec 28, 2008 at 6:28 PM, Daniel <[email protected]> wrote: > > Hi guys, > > I'm creating a small fork of chromium that adds functionality specific > to my project's needs. I'd like to add a new button to the toolbar > (i.e. toolbar_view.cc), but I'm uncertain about the correct process. > > What I've gathered so far based on poking around: > > 1. Create a new image. Save it to chromium\src\chrome\app\theme (e.g. > MyButton.png). > > 2. Create a resource ID. Open chromium\src\chrome\app\theme > \theme_resources.h and add a new #define at the end of the file and > selecting the next incremental (e.g. <code>#define IDR_MYBUTTON 9312</ > code> if the last value was 9311). > > 3. Map the resource ID to the image resource by opening chromium\src > \chrome\app\theme\theme_resources.rc in a text editor(?) and adding a > line for IDR_MYBUTTON mapping it to MyButton.png (e.g. > <code>IDR_MYBUTTON BINDATA "MyButton.png"</code>). > > Is this right? Should I be doing this manually as described above, or > are there scripts that I should be using? > > Thanks, > Daniel > > > --~--~---------~--~----~------------~-------~--~----~ Chromium Developers mailing list: [email protected] View archives, change email options, or unsubscribe: http://groups.google.com/group/chromium-dev -~----------~----~----~----~------~----~------~--~---
