aardappel / procrastitracker

a Windows time tracking application
http://strlen.com/procrastitracker/
483 stars 53 forks source link

Reusing images is buggy #92

Closed AntonBogun closed 2 years ago

AntonBogun commented 2 years ago

I could not find a way to reuse an image and be able to resize it without resizing the original, and while trying to circumvent that by putting the copied image into a smaller grid, I get weird bugs like image this one (achieved by reusing an image in a subgrid and repeatedly decreasing the text size of the grid with the image until it collapses into pixel size, and then zooming into this).

Additionally, pressing escape to get up a grid level in this view resets the zoom up to the main level, while the selection remains on the same grid as prior to pressing escape.

AntonBogun commented 2 years ago

Nevermind, the escape zooming out issue is not related to the images, it's rather that when the current grid select level is right under the current zoom level, pressing escape moves the grid select level up by one, which causes the zoom to be insufficient. However, instead of simply moving the zoom level by one the zoom level resets to base level, which makes it quite cumbersome to go up levels. It also seems that delete does not actually delete a subgrid of a cell if the cell is the current zoom level.

AntonBogun commented 2 years ago

Ok, the worst bug I've found so far is that if there is a tree of collapsed (pixel size) subgrids, entering into one collapsed subgrid actually descends by 2 layers rather than 1.

aardappel commented 2 years ago

So first, yes, images are shared, for good reason, so you can use them many times in a document without bloating the file. Making 2 copies at different sizes should be easy by simply loading/dragging in a second copy.

And yes, images also disappear at minified text size.

As for your other issues, you'll need to be clearer as to what steps you're going thru, what you were expecting to see and what instead you see. Maybe based on the tutorial file so I can follow along.

AntonBogun commented 2 years ago

So first, yes, images are shared, for good reason, so you can use them many times in a document without bloating the file. Making 2 copies at different sizes should be easy by simply loading/dragging in a second copy.

Is there some place where all the loaded pictures are listed and from where more copies of the same picture can be loaded? I was doing this by copying the cell with the picture, but this seems to link the two and thus make changing the scale individually impossible.

aardappel commented 2 years ago

There is no such list. You create a second copy simply by using the Add Image menu option, or drag & drop.

AntonBogun commented 2 years ago

Does this copy the image again in the file or does it know that it's simply a copy and therefore avoids extra memory usage?

aardappel commented 2 years ago

It will make an entirely new copy.

If by "resize" above you meant using the Scale Image (resample pixels) option, this will change the image, so they have to be copies if you want to see two different sizes. Resampling affects all uses of an image.

Instead you can also use Scale Image (display only), which works on a shared image, and multiple uses have different sizes. This of course has the disadvantage that large images scaled down for display still use as much memory as the 100% version.

AntonBogun commented 2 years ago

By resize I mean the display scale, I couldn't get the scale to work without it sharing across all instances of the image

aardappel commented 2 years ago

You are correct, I had somehow assumed display scale was on a per cell basis, but it is per image.

That should indeed be fixed.. looking at the code though, that is not entirely a trivial change.

For now, if you need 2 sizes of an image, I'd recommend loading in a second copy and using Scale Image (resample pixels) on it.

AntonBogun commented 2 years ago

Well, at least good to know it is indeed a bug rather than me not understanding something. I am currently working on a minimal example of what I don't think is intended about the zooming behaviour and I will post it here once it's complete.

aardappel commented 2 years ago

sure, maybe make that it's own issue

AntonBogun commented 2 years ago

Oh my, I did not see this was the wrong github page, I should probably close my issues and post them at TreeSheets

aardappel commented 2 years ago

Hah I didn't either, since I run both projects.

Yes, open one at TreeSheets, but link to this one for context.