From c86a932dea9d15974e42c99b41ef8f34b17462df Mon Sep 17 00:00:00 2001 From: John Hodge Date: Tue, 19 Feb 2013 12:53:32 +0800 Subject: [PATCH] Usermode/AxWin3 - A couple more icons, render fixes --- Usermode/Applications/axwin3_src/WM/Makefile | 13 +++++++++---- .../axwin3_src/WM/renderers/widget/spacer.c | 4 ++-- .../axwin3_src/WM/resources/toolbar_open.png | Bin 0 -> 133 bytes .../axwin3_src/WM/resources/toolbar_save.png | Bin 0 -> 129 bytes Usermode/Applications/gui_ate_src/main.c | 2 +- Usermode/Applications/gui_ate_src/strings.c | 4 +++- 6 files changed, 15 insertions(+), 8 deletions(-) create mode 100755 Usermode/Applications/axwin3_src/WM/resources/toolbar_open.png create mode 100755 Usermode/Applications/axwin3_src/WM/resources/toolbar_save.png diff --git a/Usermode/Applications/axwin3_src/WM/Makefile b/Usermode/Applications/axwin3_src/WM/Makefile index 4150e945..3bc24f8e 100644 --- a/Usermode/Applications/axwin3_src/WM/Makefile +++ b/Usermode/Applications/axwin3_src/WM/Makefile @@ -23,7 +23,7 @@ OBJ += renderers/widget/textinput.o OBJ += renderers/widget/spacer.o OBJ += renderers/widget/subwin.o -PNGIMAGES := toolbar_new.png +PNGIMAGES := toolbar_new.png toolbar_save.png toolbar_open.png LDFLAGS += -limage_sif -luri -lnet -lunicode @@ -45,9 +45,14 @@ install: install_resources $(IMG2SIF): $(MAKE) -C $(dir $(IMG2SIF)) img2sif -install_%.sif: resources/%.png +all: $(addprefix resources/,$(PNGIMAGES:%.png=.%.sif)) + +resources/.%.sif: $(IMG2SIF) Makefile resources/%.png @echo img2sif resources/$*.png - @$(IMG2SIF) resources/$*.png resources/.$*.sif - @$(xCP) resources/.$*.sif $(DISTROOT)/$(DIR)/$*.sif + @$(IMG2SIF) --rle1x32 resources/$*.png resources/.$*.sif + +install_%.sif: resources/.%.sif ; + @echo [xCP] $(DISTROOT)/$(DIR)/$*.sif + @$(xCP) $< $(DISTROOT)/$(DIR)/$*.sif install_resources: $(IMG2SIF) $(addprefix install_,$(PNGIMAGES:%.png=%.sif)) diff --git a/Usermode/Applications/axwin3_src/WM/renderers/widget/spacer.c b/Usermode/Applications/axwin3_src/WM/renderers/widget/spacer.c index 54f20292..028ed61d 100644 --- a/Usermode/Applications/axwin3_src/WM/renderers/widget/spacer.c +++ b/Usermode/Applications/axwin3_src/WM/renderers/widget/spacer.c @@ -40,8 +40,8 @@ void Widget_Spacer_Render(tWindow *Window, tElement *Element) void Widget_Spacer_Init(tElement *Element) { - Element->MinH = SPACER_RULE_SIZE+1; - Element->MinW = SPACER_RULE_SIZE+1; + Element->MinH = SPACER_RULE_SIZE+2; + Element->MinW = SPACER_RULE_SIZE+2; } DEFWIDGETTYPE(ELETYPE_SPACER, diff --git a/Usermode/Applications/axwin3_src/WM/resources/toolbar_open.png b/Usermode/Applications/axwin3_src/WM/resources/toolbar_open.png new file mode 100755 index 0000000000000000000000000000000000000000..b3289a817afabfd508a7cf9225435da27cdb1fa9 GIT binary patch literal 133 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`KAtX)Ar_~T6C^%0Oq6id50m`w zE dZsd_=V6Y1ozQ1x-)Ni1<44$rjF6*2UngEE6C;b2b literal 0 HcmV?d00001 diff --git a/Usermode/Applications/axwin3_src/WM/resources/toolbar_save.png b/Usermode/Applications/axwin3_src/WM/resources/toolbar_save.png new file mode 100755 index 0000000000000000000000000000000000000000..9d561d29ce22a2e7f1741f69ac976c7c44b42ee0 GIT binary patch literal 129 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`9-c0aAr_~T6C^SYa3tGkeEWO; zz<~oF%r=UyXM6bbDi7D**$;osII&SQP4Xt20&^E{!og?98%rA#O2y-N-$$Qb@wzFH dnT?r&f$28yi>$A*JU}xUJYD@<);T3K0RTW|Ed>Ao literal 0 HcmV?d00001 diff --git a/Usermode/Applications/gui_ate_src/main.c b/Usermode/Applications/gui_ate_src/main.c index a6bbee64..a3c452b4 100644 --- a/Usermode/Applications/gui_ate_src/main.c +++ b/Usermode/Applications/gui_ate_src/main.c @@ -77,7 +77,7 @@ int main(int argc, char *argv[]) // AxWin3_RichText_SetLineCount(gMainWindow_TextArea, 3); AxWin3_RichText_SendLine(gMainWindow_TextArea, 0, "First line!"); - AxWin3_RichText_SendLine(gMainWindow_TextArea, 2, "Third line! \x01""ff0000A red"); + AxWin3_RichText_SendLine(gMainWindow_TextArea, 2, "Third line! \x01""ff0000red\x01""00ff00green"); // AxWin3_ShowWindow(gMainWindow_TextArea, 1); diff --git a/Usermode/Applications/gui_ate_src/strings.c b/Usermode/Applications/gui_ate_src/strings.c index 96b6c0e9..f5dea51a 100644 --- a/Usermode/Applications/gui_ate_src/strings.c +++ b/Usermode/Applications/gui_ate_src/strings.c @@ -29,7 +29,9 @@ const struct keyval_str gaDisplayStrings[] = { }; const int ciNumDisplayStrings = sizeof(gaDisplayStrings)/sizeof(gaDisplayStrings[0]); const struct keyval_str gaImageStrings[] = { - {"BtnNew", "file:///Acess/Apps/AxWin/3.0/toolbar_new.sif"} + {"BtnNew", "file:///Acess/Apps/AxWin/3.0/toolbar_new.sif"}, + {"BtnOpen", "file:///Acess/Apps/AxWin/3.0/toolbar_open.sif"}, + {"BtnSave", "file:///Acess/Apps/AxWin/3.0/toolbar_save.sif"} }; const int ciNumImageStrings = sizeof(gaImageStrings)/sizeof(gaImageStrings[0]); -- 2.20.1