-
Notifications
You must be signed in to change notification settings - Fork 139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Images not aligned properly in Expand Bar #1527
Images not aligned properly in Expand Bar #1527
Conversation
Test Results 483 files ±0 483 suites ±0 8m 4s ⏱️ - 1m 29s For more details on these failures, see this check. Results for commit 377d3eb. ± Comparison against base commit d59358c. ♻️ This comment has been updated with latest results. |
730d212
to
1b48004
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code looks quite good and it's easy to understand (just one minor nit-pick), but I tested it and found an issue.
How to reproduce
- Change the second image of
org.eclipse.swt.examples.controlexample.ControlExample.imageLocations
fromopenFolder.gif
to some other image that is way bigger (e.g. 300 x 300 or more) - Run the
ControlsExample
and go to theExpandBar
- Expand the upper section: "What is your favorite button?"
The text of the second section (1) and its image (2) are still in the same place as before but they should be moved a bit lower.
I can't reproduce this error on master
, I mean the text is still too low but it will be moved accordingly when expanding/collapsing the first section:
bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ExpandItem.java
Outdated
Show resolved
Hide resolved
bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ExpandItem.java
Outdated
Show resolved
Hide resolved
8aeba54
to
1668418
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for fixing the issue, @ShahzaibIbrahim ! I tested again and I only have 2 comments about changes that need to be reverted.
I would also change the first line of the commit text to Properly align big images in ExpandBar
.
Once that is fixed, the PR is good to go on my account.
...les/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ControlExample.java
Outdated
Show resolved
Hide resolved
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ExpandBarTab.java
Outdated
Show resolved
Hide resolved
The bug I discovered has been fixed. The rest is not a show stopper
4fe7f0c
to
18f657f
Compare
bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ExpandItem.java
Outdated
Show resolved
Hide resolved
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ExpandBarTab.java
Outdated
Show resolved
Hide resolved
967e456
to
24debb2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The recent changes have properly addressed my comment. In my opinion, the selected margin looks good:
And adding this margin does also not change exististing layout (i.e., does not unnecessarily introduce additional margins), at least when taking a look at the ControlExample (left is existing, right is with this PR):
I have just one remaining comment.
bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ExpandItem.java
Outdated
Show resolved
Hide resolved
6c14f5f
to
8f576a1
Compare
8f576a1
to
290e677
Compare
When adding image larger than the header size in expand bar, it was drawn outside of the bar on the top. This was due to wrong calculation and mixing of points and pixels
290e677
to
377d3eb
Compare
Test failures unrelated and documented: #1564 |
When adding image larger than the header size in expand bar, it was drawn outside of the bar on the top. This was due to wrong calculation and mixing of points and pixels.
HOW TO TEST
Go to ExpandBarTab class and set any larger image on item
Run the
ControlExample
with the following VM ArgumentsSCREENSHOTS
Before Fix:
After Fix: