From: poy <po...@12...> - 2008-02-06 14:30:00
|
this (big) patch adds icons in the main menu of DC++. "and more": the menu has a nice style with borders, shadows, etc. :) i used WidgetMenuExtended, which i had to "port" from "vanilla SmartWin" to "DC++'s SmartWin", which means i did *a lot* of changes everywhere in the class (simplify template args, use seeds, change the way messages are dispatched and caught, and many other small fixes to make it compile and run fine...). the file is huge so there may still be fixes left to be done, but overall it's now consistent with the rest of the SmartWin classes used in DC++. i pasted most fixes from WidgetMenu; there is, however, one important difference between WidgetMenu and WidgetMenuExtended: while the former doesn't require any parent, the latter must have one in order to catch custom draw messages (and that parent is used for some more stuff during painting, too). unlike usual command bars that use image lists, WidgetMenuExtended requires single bitmaps for each command, so i sliced toolbar.bmp into 16pixels parts. all these parts are in the folder res/menu. WidgetMenuExtended allows for more than the bitmap to be changed (text color, bg color, etc can be changed too), but we only change the bitmap in the DC++ main menu so i overloaded the WidgetMenuExtended::appendItem function to accept bitmaps directly. added files: smartwin/source/widgets/WidgetMenuExtended.cpp the folder res/menu which contains 16 bitmaps, all included in the rar file. deleted: res/toolbar.bmp attached is a screenshot of the result. all previous icons that were in the WTL version of DC++ have been added, but there are still some commands that are icon-less; new icons are welcome. ;) (icons, actually bitmaps, have to be 16x16 bmp files that use RGB(255, 0, 255) (full red, no green, full blue) as their background color; that color will render as transparent in DC++.) poy |