The time now is Sat 25 May 2013, 01:02
All times are UTC - 4 |
|
Page 2 of 2 [23 Posts] |
Goto page: Previous 1, 2 |
| Author |
Message |
vovchik

Joined: 23 Oct 2006 Posts: 1231 Location: Ukraine
|
Posted: Thu 17 Sep 2009, 10:24 Post subject:
|
|
Dear wjaguar,
Everything works as you said it would. My mtpaintrc file looks like this:
| Code: |
# choose a location (directory) for your mtpaint theme (icon dir)
pixmap_path "/root/.mtpaint-theme/"
# icon definitions go here
style "mtPaint" { stock["mtpaint_brcosa"] = { { "mtpaint_brcosa.png",*, *, * } } }
style "mtPaint" { stock["mtpaint_case"] = { { "mtpaint_case.png",*, *, * } } }
style "mtPaint" { stock["mtpaint_centre"] = { { "mtpaint_centre.png",*, *, * } } }
style "mtPaint" { stock["mtpaint_cline"] = { { "mtpaint_cline.png",*, *, * } } }
style "mtPaint" { stock["mtpaint_clone"] = { { "mtpaint_clone.png",*, *, * } } }
style "mtPaint" { stock["mtpaint_close"] = { { "mtpaint_close.png",*, *, * } } }
style "mtPaint" { stock["mtpaint_config"] = { { "mtpaint_config.png",*, *, * } } }
.... (and so on)
widget_class "*" style "mtPaint"
|
many thanks and kind regards,
vovchik
|
|
Back to top
|
|
 |
ttuuxxx

Joined: 05 May 2007 Posts: 10720 Location: Ontario Canada,Sydney Australia
|
Posted: Thu 17 Sep 2009, 12:45 Post subject:
|
|
Hi vovchik when your finished could you please post a skinned version with the mtpaintrc and icons. That would save everybody a lot of time figuring it, I'm more foccused on 2.20 and don't have time figure this out from scratch.
Thanks
ttuuxxx
_________________ http://audio.online-convert.com/ <-- excellent site
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games

|
|
Back to top
|
|
 |
vovchik

Joined: 23 Oct 2006 Posts: 1231 Location: Ukraine
|
Posted: Thu 17 Sep 2009, 13:48 Post subject:
|
|
Dear ttuuxxx,
Here is my mtpaintrc and my .mtpaint-theme (hidden) dir full of png icons. I bashed this set together quickly, using some of your icons and some others that are supposed to match my OSX GTK/KDE/QT/IceWM themes. All this should be unpacked in /root.
With kind regards,
vovchik
PS. More work could be done, as evidenced by my screen shot
| Description |
|
| Filesize |
18.78 KB |
| Viewed |
361 Time(s) |

|
| Description |
|

Download |
| Filename |
mtpaint-stuff.tar.gz |
| Filesize |
69.12 KB |
| Downloaded |
285 Time(s) |
|
|
Back to top
|
|
 |
ttuuxxx

Joined: 05 May 2007 Posts: 10720 Location: Ontario Canada,Sydney Australia
|
Posted: Thu 17 Sep 2009, 14:00 Post subject:
|
|
| vovchik wrote: | Dear ttuuxxx,
Here is my mtpaintrc and my .mtpaint-theme (hidden) dir full of png icons. I bashed this set together quickly, using some of your icons and some others that are supposed to match my OSX GTK/KDE/QT/IceWM themes. All this should be unpacked in /root.
With kind regards,
vovchik
PS. More work could be done, as evidenced by my screen shot |
vovchik it saves me a lot of time so thank you
ttuuxxx
_________________ http://audio.online-convert.com/ <-- excellent site
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games

|
|
Back to top
|
|
 |
wjaguar
Joined: 21 Jun 2006 Posts: 182
|
Posted: Thu 17 Sep 2009, 14:40 Post subject:
|
|
| vovchik wrote: | | Here is my mtpaintrc and my .mtpaint-theme (hidden) dir full of png icons. |
Good that you included setting "gtk-icon-sizes" in your mtpaintrc. But for best results, the size which mtPaint uses should be set to precisely the unscaled size of the icons. Like this:
| Code: | | gtk-icon-sizes="gtk-small-toolbar=22,22" |
Because, see, GTK's image scaling code is completely braindead, and its results are of a very bad quality.
And if an icon is originally larger than needed, it is better to rescale it with mtPaint, than leave the job to GTK+.
First, "Scale canvas" - with default "Blackman-Harris" method, gamma correction enabled, and "Sharper image reduction" in settings toggled on.
Then, "Unsharp mask" for improving the contrast - a good working recipe is one pass with radius 1 and amount 0.40, and then another with radius 30 and amount 0.10. (This is what Wikipedia engine does when serving reduced-size images, since 2007.)
BTW, image scaling was the reason why I got involved with mtPaint: no existing program was able to do it properly, so I had to implement it myself.
|
|
Back to top
|
|
 |
technosaurus

Joined: 18 May 2008 Posts: 3843
|
Posted: Sun 15 Nov 2009, 19:17 Post subject:
|
|
wjaguar has added many features - here is a build for testing
(no external images in this one - just the default builtins)
| Description |
|

Download |
| Filename |
mtPaint-3.34.33-i486.pet |
| Filesize |
235.63 KB |
| Downloaded |
257 Time(s) |
_________________ Puppy Web Desktop Now with pet packages - Pet Packaging 100 & 101
|
|
Back to top
|
|
 |
technosaurus

Joined: 18 May 2008 Posts: 3843
|
Posted: Fri 01 Jun 2012, 16:33 Post subject:
|
|
I wanted to have more colors in my xpm files without adding unnecessary size, this tarball contains a patch to allow mtpaint to use 92 colors vs 64, it is also set up so that it can more easily be modified for more than 2 characters wide. (the tarball also has a few builtin xpms that were reduced by about 1kb total)
here is what it looks like:
| Code: | --- src/png.c~ 2012-03-01 06:33:16.000000000 +0800
+++ src/png.c 2012-06-01 17:30:10.950797471 +0800
@@ -3925,8 +3925,8 @@ fail: fclose(fp);
return (res);
}
-static const char base64[] =
- "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",
+static const char ascii[] =
+ "!#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~",
hex[] = "0123456789ABCDEF";
/* Extract valid C identifier from filename */
@@ -3947,7 +3947,7 @@ static int save_xpm(char *file_name, ls_
{
unsigned char rgbmem[XPM_MAXCOL * 4], *src;
const char *ctb;
- char ws[3], *buf, *tmp;
+ char ws[4], *buf, *tmp;
str_hash cuckoo;
FILE *fp;
int bpp = settings->bpp, w = settings->width, h = settings->height;
@@ -4001,7 +4001,8 @@ static int save_xpm(char *file_name, ls_
trans = settings->xpm_trans;
}
- cpp = cols > 64 ? 2 : 1;
+ cpp = cols > (strlen(ascii)+1) ? 2 : 1;
+ /* cpp = cols > ((strlen(ascii)+1)*(strlen(ascii)+1)) ? 3 : cpp; */
buf = malloc(w * cpp + 16);
if (!buf) return -1;
@@ -4022,19 +4023,21 @@ static int save_xpm(char *file_name, ls_
else fprintf(fp, "\"%d %d %d %d\",\n", w, h, cols, cpp);
/* Create colortable */
- ctb = cols > 16 ? base64 : hex;
- ws[1] = ws[2] = '\0';
+ ctb = cols > 16 ? ascii : hex;
+ ws[1] = ws[2] = '\0'; /* ws[3]='\0'; */
for (i = 0; i < cols; i++)
{
if (i == trans)
{
ws[0] = ' ';
if (cpp > 1) ws[1] = ' ';
+ /* if (cpp > 2) ws[2] = ' '; */
fprintf(fp, "\"%s\tc None\",\n", ws);
continue;
}
- ws[0] = ctb[i & 63];
- if (cpp > 1) ws[1] = ctb[i >> 6];
+ ws[0] = ctb[i % strlen(ascii)];
+ if (cpp > 1) ws[1] = ctb[i / strlen(ascii)];
+ /* if (cpp > 2) ws[2] = ctb[i / (strlen(ascii)*strlen(ascii))]; */
src = rgbmem + i * 4;
fprintf(fp, "\"%s\tc #%02X%02X%02X\",\n", ws,
src[0], src[1], src[2]);
@@ -4052,8 +4055,10 @@ static int save_xpm(char *file_name, ls_
if (k == trans) tmp[0] = tmp[1] = ' ';
else
{
- tmp[0] = ctb[k & 63];
- tmp[1] = ctb[k >> 6];
+
+ tmp[0] = ctb[k % strlen(ascii)];
+ tmp[1] = ctb[k / strlen(ascii)];
+ /* tmp[2] = ctb[k / (strlen(ascii)*strlen(ascii))]; */
}
}
strcpy(tmp, i < h - 1 ? "\",\n" : "\"\n};\n"); |
to add 3+ character wide support ws[3] would need to be increased to ws[4] and would need to compute ws[2] and tmp[2], which is basically i or k / (strlen(ascii)*strlen(ascii)) ... I think, if not, its a good place to start
| Description |
updated patch fixes colors > 184 and has 3 wide support commented out for future use
|

Download |
| Filename |
xpm_colors.patch.gz |
| Filesize |
1 KB |
| Downloaded |
131 Time(s) |
| Description |
|

Download |
| Filename |
fixed_icons.tar.gz |
| Filesize |
2.45 KB |
| Downloaded |
137 Time(s) |
_________________ Puppy Web Desktop Now with pet packages - Pet Packaging 100 & 101
|
|
Back to top
|
|
 |
technosaurus

Joined: 18 May 2008 Posts: 3843
|
Posted: Fri 01 Jun 2012, 20:45 Post subject:
|
|
I just realized the hex part may be broken... Need to test something with 16 colors, but it looks like it may be totally unnecessary anyways.
_________________ Puppy Web Desktop Now with pet packages - Pet Packaging 100 & 101
|
|
Back to top
|
|
 |
|
|
Page 2 of 2 [23 Posts] |
Goto page: Previous 1, 2 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|