[FIXED] patchimage not applied in some cases

Things you’d like to miss in the future...
Forum rules
You might want to read this if you're looking for priority service

:info: Please Include The Following Information
1) Your XYplorer Version (e.g., v28.00.0801)
2) Your Windows Version (e.g., Win 11)
3) Your Screen Scaling Percentage (e.g., 125%).

:info: Use Your Profile Or Signature
We strongly recommend adding your Windows Version and Screen Scaling Percentage to the Location field in your Profile or to your Signature. That way, you only have to type them once, and we won't have to search for that vital information.

:info: How To Attach Images
When attaching an Image, please use the Attachment tab at the bottom of your post and click "Add files".
bdeshi
Posts: 4256
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612
Contact:

[FIXED] patchimage not applied in some cases

Post 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
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

bdeshi
Posts: 4256
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612
Contact:

Re: patchimage not applied in some cases

Post 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
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

admin
Site Admin
Posts: 67271
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: patchimage not applied in some cases

Post 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.)

bdeshi
Posts: 4256
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612
Contact:

Re: patchimage not applied in some cases

Post by bdeshi »

sure, thanks!
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

admin
Site Admin
Posts: 67271
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: patchimage not applied in some cases

Post 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

bdeshi
Posts: 4256
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612
Contact:

Re: patchimage not applied in some cases

Post by bdeshi »

Ah, thanks. Both Customize Toolbar and toolbar() are totally silent about this. it's no big deal though . :tup:
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

bdeshi
Posts: 4256
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612
Contact:

Re: [FIXED] patchimage not applied in some cases

Post 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.
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

admin
Site Admin
Posts: 67271
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: [FIXED] patchimage not applied in some cases

Post by admin »

The **keys are for resource hackers only, so I don't f**king care. :mrgreen:

jupe
Posts: 3570
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: [FIXED] patchimage not applied in some cases

Post 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:

admin
Site Admin
Posts: 67271
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: [FIXED] patchimage not applied in some cases

Post by admin »

No problem here:
To see the attached files, you need to log into the forum.

jupe
Posts: 3570
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: [FIXED] patchimage not applied in some cases

Post 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.

bdeshi
Posts: 4256
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612
Contact:

Re: [FIXED] patchimage not applied in some cases

Post 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-
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

admin
Site Admin
Posts: 67271
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: [FIXED] patchimage not applied in some cases

Post by admin »

Should work in next version...
To see the attached files, you need to log into the forum.

bdeshi
Posts: 4256
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612
Contact:

Re: [FIXED] patchimage not applied in some cases

Post by bdeshi »

too much rolling stones! :kidding:
(thanks)
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

admin
Site Admin
Posts: 67271
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: [FIXED] patchimage not applied in some cases

Post by admin »

BTW, click3 and scriptXX are not used.

Post Reply