You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I am trying to create a ImageCell and I set all padding to 0 it is ignored and padding is left there.
Here is my code:
be.quodlibet.boxable.image.Image icon = ImageUtils.readImage(getBackupStatusIcon("green"));
cell = row.createImageCell(iconWidth, icon, HorizontalAlignment.CENTER, VerticalAlignment.MIDDLE);
cell.removeAllPadding(); // this is ignored, image is scaled before you can change padding values
Result is:
I left borders there so it is clear that around each dot - representing status icon there is a padding from left and right even I set it to 0 by using removeAllPadding() method. You can see that icons are super small even they should occupy all space between black borders around.
From investigation I found that image is scaled down immediately after instantiation of ImageCell object:
You can see that getInnerWidth() is calculated using default paddings = 5f and image is scaled down. Before you can even set the padding to be = 0; so the result is:
Instance is created and image size is calculated using default paddings = 5f
Image is scaled down based on step 1)
Then you are allowed to set padding to the new values
These values are ignored as instance was already created and image size down scaled.
When I tried to debug the issue and set those default padding values manually in debugger during the run the result was what I would expect:
The text was updated successfully, but these errors were encountered:
Hi.
When I am trying to create a ImageCell and I set all padding to 0 it is ignored and padding is left there.
Here is my code:
Result is:
I left borders there so it is clear that around each dot - representing status icon there is a padding from left and right even I set it to 0 by using removeAllPadding() method. You can see that icons are super small even they should occupy all space between black borders around.
From investigation I found that image is scaled down immediately after instantiation of ImageCell object:
You can see that getInnerWidth() is calculated using default paddings = 5f and image is scaled down. Before you can even set the padding to be = 0; so the result is:
When I tried to debug the issue and set those default padding values manually in debugger during the run the result was what I would expect:
The text was updated successfully, but these errors were encountered: