Icons in wxListCtrls aren't drawn quite right when using scaling on wxGTK. It appears they have lost padding on the bottom and right sides, or are maybe being offset down and left. Any scale factor other than 100%, whether fractional or integral, results in the the exact same issue. This issue occurs with all 3.3.x versions, and none of the 3.0-3.2 versions I tested.
wxWidgets 3.2.8, 150% scale:
image.png (view on web)
wxWidgets 3.3.2, 150% scale:
image.png (view on web)
wxWidgets 3.3.2, 100% scale:
image.png (view on web)
wxWidgets 3.3.2, 200% scale:
image.png (view on web)
I would expect the icons to be placed exactly the same as in versions earlier than 3.3.0. In those versions, the icon is vertically centered in the list item, and is not overlapped by text from the same cell.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
Also tested with the current latest commit: 719c678
Behavior is the same as with all 3.3.x releases
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
There must be something which makes the problem appear in your code but not in the listctrl sample which appears just fine in 200% scaling. Could you please try to find out what the difference is and, ideally, make the smallest possible patch reproducing the problem in the sample?
Also, does your code use legacy wxImageList or newer API supporting high DPI?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
Could you please try to find out what the difference is and, ideally, make the smallest possible patch reproducing the problem in the sample?
Yep! I was already planning on it, but just hadn't gotten around to it yet. Will see what I can do.
Also, does your code use legacy
wxImageListor newer API supporting high DPI?
wxImageList at the moment, currently migrating from v3.0.5. All the icons are 16x16.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
It looks like building the 3.1.5 version of the listctrl example (the last before it stopped using wxImageList) with 3.3.x shows the exact same issue I was seeing.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
Updating my code to use the newer API seems to fix this as well, so it definitely appears to be an issue with wxImageList.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
Oops, I do indeed see the problem with the 3.1.5 version of the sample built against current master, I'll have a look. I thought I had tested this before making changes to the sample, but apparently not :-(
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
I wonder if #24033 might be the source of the issue.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
The fix for this bug is just
diff --git a/include/wx/withimages.h b/include/wx/withimages.h index f19f5cfbe8..48fa4c79d2 100644 --- a/include/wx/withimages.h +++ b/include/wx/withimages.h @@ -196,8 +196,7 @@ public: } else if ( m_imageList ) { - // All images in the image list are of the same size. - size = window->FromPhys(m_imageList->GetSize()); + size = m_imageList->GetBitmap(iconIndex).GetLogicalSize(); } }
however I found another problem under Windows while testing it, so I'll push this a bit later, when I find and fix that one too.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
I'm finally going to push this fix directly because the MSW problem is more serious (and not really related, as it's not in wxImageList itself but in wxIcon).
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()