True center on <imagegrid>
-
Is there an actual true center on the image grid?
<imagegrid name="gamegrid">
<pos>-0.375 0</pos>
<size>1 1</size>
<margin>0.01 0.01</margin>
<autoLayout>1 8</autoLayout>
<autoLayoutSelectedZoom>1.3</autoLayoutSelectedZoom>
<centerSelection>true</centerSelection>
<scrollLoop>true</scrollLoop>
</imagegrid>Even though I have <centerSelection> set to"true", the center of the grid changes depending on which direction I scroll in. the GTA V logo will be the initial center, when I scroll up or down, the center position will change. I noticed the scroll does not always move the grid, which I think is the problem, but am not sure. My <autoLayout> is set to one row and want to keep it that way.
-
@retrobox Can you share your theme so I can try to reproduce the problem?
As far as I know, this should be easy to achieve, but I need to try it out and take a look at the code, a lot of modifications were made on the grid view since I worked on it.
Also, to answer your other question, having the selected image always centered is the easiest way to achieve this, but you could also try to set a custom background for the selected grid tile.
-
@a12c4 yeah of course! Thanks for looking into it. I'll share the main XML and one for one of the system themes in a bit.
-
-
I tried to share as many assets as possible, but my setup is on a PC, so a lot of files are on a different drive. Also, a lot of the paths will obviously not match up. Sorry if that causes any headaches.
-
@retrobox Well your problem is just that you use an even number of rows, try using an odd number of rows and it should always stay centered.
for example
<autoLayout>1 7</autoLayout>
instead of
<autoLayout>1 8</autoLayout>
-
@a12c4 Ah, okay. I'll give that a try in the next couple of days. Thanks for the advice and for looking into it for me! I'll let you know how it turns out.
-
@a12c4 Alright, it worked! kind of embarrassing since it's such a simple fix. Though thinking about it, it makes complete sense why an odd number would work. Anyway, thanks again! You saved me a lot of time, as it would have taken a while until I would have realized the problem. Take care!
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.