Ok.. I think I've fixed the fill bug.
Undo/Redo is nearly done..
Something else I've been thinking about. The tool icons are currently 24 x 24 pixels in size with a gap of 8 pixels (So an icon is drawn every 32 pixels). With the GUI width of 224 pixels this lets me fit in 7 icons in a row (instead of the 8 I had in the old large version). Now.. if I reduce the gap to 4 pixels then I can fit 8 icons in again, but it does look a bit cramped.
So I don't know whether I will really need the 8 icons across yet, and if I do I don't want to redraw all the icons at a late stage. So I'm wondering whether it would be best to draw icons in something like 20 x 20 now?
Photoshop's tools seem to average around 16 x 16 (some are bigger), but none seem much more than 20 x 20. The second column of icons is 26 pixels after the first.
The small icons windows uses in their office programs like Excel are around 16 x 16 pixels (maximum for nearly all) with a spacing of 23 pixels.
Well, just thinking about it at the moment.. We will see!