Page 1 of 2

[FIXED] patchimage not applied in some cases

Posted: 23 Mar 2019 07:53
by bdeshi
the PatchImagesPath tweak cannot patch the disabled state of icons, but the patchimage command can.

Code: Select all

patchimage 'undo', "<xydata>\Patch\undo.png";
patchimage 'undo-', "<xydata>\Patch\undo-.png";
patches both states of the redo button. But PatchImagesPath=Patch method only patches the enabled state.
This is happening because the - in undo-.png is taken as a separator.
admin wrote: 21 Mar 2019 19:25

Code: Select all

v19.80.0115 - 2019-03-21 19:24
      [...] Each image file must have the image key 
      in the beginning of the filename, optionally searated by "-" from any 
      other parts of the name.
Please change this. A space can be a good separator, since button keys do not contain spaces. For example:

Code: Select all

undo-.png // patches undo disabled state
undo- rest-of-filename.png // patches undo disabled state
undo-,1 rest-of-filename.png // patches undo disabled state, small size

Re: patchimage not applied in some cases

Posted: 23 Mar 2019 07:59
by bdeshi
At least these two buttons, back and fore, cannot be patched with either SC patchimage or the tweak.
But their disabled state can be patched with patchimage.

Code: Select all

patchimage "back-", "<xydata>\Patch\back-.png"; //works
patchimage "back", "<xydata>\Patch\back.png"; // no effect. the tweak also fails

Re: patchimage not applied in some cases

Posted: 23 Mar 2019 14:45
by admin
Oh yes, "-" was such a dumb choice. :roll: All will be good in the next beta...

PS: Actually I think I'll take the dot instead. (Space has its own disadvantages.)

Re: patchimage not applied in some cases

Posted: 23 Mar 2019 15:14
by bdeshi
sure, thanks!

Re: patchimage not applied in some cases

Posted: 23 Mar 2019 17:15
by admin
Conc. back and fore: if this is checked then the keys "backtab" and "foretab" are used.
Configuration | General | Refresh, Icons, History | History | History per tab

Re: patchimage not applied in some cases

Posted: 23 Mar 2019 21:20
by bdeshi
Ah, thanks. Both Customize Toolbar and toolbar() are totally silent about this. it's no big deal though . :tup:

Re: [FIXED] patchimage not applied in some cases

Posted: 23 Mar 2019 21:36
by bdeshi

Code: Select all

      The separator between key and the rest of the filename is now ".", not "-" 
      anymore. Examples:
        flatview.Cherries-24 x 24.png
Great! But the issue now is, how do people patch the darn 'cherries**' key? As you know, some people seem to absolutely hate this one. :lol:

Actually, seriously, since patchimage 'cherries**', 'not-cherries.png'; does work, would you consider swapping out the asterisks from button keys with something more filesystem friendly * ? Just for the sake of making the command and the patch files tweak completely equivalent.

* on linux, I'm able to create a <xydata>\Patch\cherries**.png file, but this doesn't work anyway.

Re: [FIXED] patchimage not applied in some cases

Posted: 23 Mar 2019 21:42
by admin
The **keys are for resource hackers only, so I don't f**king care. :mrgreen:

Re: [FIXED] patchimage not applied in some cases

Posted: 23 Mar 2019 22:22
by jupe
Slightly off topic, but can anyone else get the 24x24 image of "rfo" to be replaced by using the tweak folder implementation, not the SC ? I seem to only be getting the 16x16 version of it replaced.

edit: actually it seems to happen to only certain keys, some replace both some only replace the smaller image, but the file gets locked still. :veryconfused:

Re: [FIXED] patchimage not applied in some cases

Posted: 23 Mar 2019 22:30
by admin
No problem here:

Re: [FIXED] patchimage not applied in some cases

Posted: 24 Mar 2019 06:06
by jupe
Well I am having weird issues, I'll have to do further testing when I get time because it is only working intermittently for me, I can't quite work out the cause yet.
The main issue is the 16 size always gets replaced the larger size only sometimes, but both files get locked so I assume it is accepting it as valid, but strangely the same thing happens if only using 1 file anyway.

Anyway I have managed to get it working for now for the images I wanted to replace, so no worries, I'll report back if I can nail down the cause.

Re: [FIXED] patchimage not applied in some cases

Posted: 27 Mar 2019 16:16
by bdeshi
These keys don't get patched. Please add support for these to patchimage, if possible.

Code: Select all


flipall
flipdown
flipup

prog1
prog2
prog3

click1
click2
click3
scriptXX

C
C-
D
D-
M
M-
N
N-
R
R-

Re: [FIXED] patchimage not applied in some cases

Posted: 27 Mar 2019 16:44
by admin
Should work in next version...

Re: [FIXED] patchimage not applied in some cases

Posted: 27 Mar 2019 16:51
by bdeshi
too much rolling stones! :kidding:
(thanks)

Re: [FIXED] patchimage not applied in some cases

Posted: 27 Mar 2019 19:43
by admin
BTW, click3 and scriptXX are not used.