1
0
mirror of git://projects.qi-hardware.com/fped.git synced 2025-04-21 12:27:27 +03:00

Make the icon for the currently selected instance transparent so that it better

blends in and won't be mistaken for a button.

- Makefile: generate icon XPMs with transparent background
- gui_util.c (make_image): set transparency color to white
- gui_util.c (make_transparent_image): new function to return a transparent
  image created from an XPM
- gui_tool.c (get_icon_by_inst): make the returned image transparent instead of
  opaque
- icons/vec.fig, icons/arc.fig, icons/line.fig, icons/rect.fig, icons/circ.fig:
  darkened to increase contrast on grey background



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5758 99fdad57-331a-0410-800a-d7fa5415bdb3
This commit is contained in:
werner
2009-12-16 17:25:13 +00:00
parent b37a8599d9
commit aca443f566
9 changed files with 36 additions and 14 deletions

View File

@@ -80,15 +80,22 @@ endif
.PHONY: all dep depend clean install uninstall manual upload-manual
.PHONY: update
.SUFFIXES: .fig .xpm
.SUFFIXES: .fig .xpm .ppm
# generate 26x26 pixels icons, then drop the 1-pixel frame
.fig.xpm:
$(GEN) fig2dev -L xpm -Z 0.32 -S 4 $< | \
convert -crop 24x24+1+1 - - | \
sed "s/*.*\[]/*xpm_`basename $@ .xpm`[]/" >$@; \
[ "$${PIPESTATUS[*]}" = "0 0 0" ] || { rm -f $@; exit 1; }
.fig.ppm:
$(GEN) fig2dev -L ppm -Z 0.32 -S 4 $< | \
convert -crop 24x24+1+1 - - >$@; \
[ "$${PIPESTATUS[*]}" = "0 0" ] || { rm -f $@; exit 1; }
# ppmtoxpm is very chatty, so we suppress its stderr
.ppm.xpm:
$(GEN) ppmcolormask white $< >_tmp && \
ppmtoxpm -name xpm_`basename $@ .xpm` -alphamask _tmp \
$< >$@ 2>/dev/null && rm -f _tmp || \
{ rm -f $@ _tmp; exit 1; }
all: fped
@@ -134,7 +141,7 @@ endif
# ----- Cleanup ---------------------------------------------------------------
clean:
rm -f $(OBJS) $(XPMS:%=icons/%)
rm -f $(OBJS) $(XPMS:%=icons/%) $(XPMS:%.xpm=icons/%.ppm)
rm -f lex.yy.c y.tab.c y.tab.h y.output .depend
# ----- Install / uninstall ---------------------------------------------------