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

Re: [XaraXtreme-dev] Icon



Thanks, but I can't make it work yet. AddAPage doesn't seem to be called with _R(IDD_OPTSTAB_GRID), the one I'm specifically looking for. I'm not sure exactly what's going wrong but I think it's some internal subtely of the resources system.

Here are some relevant tests I've done in AddAPage:

CDlgResID t1 = pDialogTabOp->DlgResID;
CDlgResID t2 = _R(IDD_OPTSTAB_GRID);
// Conditional breakpoint at this point testing whether t1==t2 is never hit.

b = *CamArtProvider::Get()->FindBitmap(_R(IDD_OPTSTAB_GRID));
// This works fine, the new icons shows up in the dialog (for all options pages, obviously).

Phil


Alex Bligh wrote:

Phil Martin wrote:

I've had a go at an icon for one of the Options dialog pages (following Mac guidelines)


Great!

but I can't see how DialogManager::AddAPage supports or intends to support an icon per page... Should the page's dialogop provide an icon identifier, is the identifier derived automatically somehow or should the icon be stored with the page's xrc definition?


Yep I commented it out so something other than red question-marks
appeared.

Find line 6619 which currently reads:
//wxBitmap b = *CamArtProvider::Get()->FindBitmap(pDialogTabOp->DlgResID);

and remove the "//wxBitmap "

so it starts "b = CamArtProvider::Get()", then comment out
the line above it.

That /should/ be the only change necessary.

You bitmaps then need to be called the same thing as the options
page with png on the end, i.e.
 IDD_OPTSTAB_VIEW.png
 IDD_OPTSTAB_MISC.png
 IDD_OPTSTAB_PAGE.png
 IDD_OPTSTAB_TUNE.png
 IDD_OPTSTAB_SCALE.png
 IDD_OPTSTAB_POINTERS.png
 IDD_OPTSTAB_GRID.png
 IDD_OPTSTAB_UNITS.png
 IDD_OPTSTAB_PLUGINS.png
 IDD_OPTSTAB_PRINTLAYOUT.png
 IDD_OPTSTAB_PRINTGENERAL.png
 IDD_OPTSTAB_PRINTPRINT.png
 IDD_OPTSTAB_IMAGESETTING.png
 IDD_OPTSTAB_INTERNET.png

Alex