-
Notifications
You must be signed in to change notification settings - Fork 12
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
Use CTabFolder to improve dark theme on Windows #14
Use CTabFolder to improve dark theme on Windows #14
Conversation
tabItem.setText(page.getTitle());// | ||
tabItem.setControl(createPageArea(tabFolder, page)); | ||
pageMap.put(tabItem, page); | ||
} | ||
tabFolder.setSelection(0); |
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.
With eclipse-platform/eclipse.platform.swt#46 fixed, this line would not be needed.
folder.setLayout(new TabFolderLayout()); | ||
folder.setLayoutData(new GridData(GridData.FILL_BOTH)); | ||
|
||
TabItem item= new TabItem(folder, SWT.NONE); | ||
CTabItem item= new CTabItem(folder, SWT.NONE); | ||
folder.setSelection(0); |
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.
With eclipse-platform/eclipse.platform.swt#46 fixed, this line would not be needed.
fd1112b
to
2a96fb4
Compare
Contributed by STMicroelectronics Signed-off-by: Torbjörn Svensson <torbjorn.svensson@st.com>
2a96fb4
to
6a5406f
Compare
@Torbjorn-Svensson can you post before / after screenshots in this issue? |
Light theme Dark theme The preference dialog has similar change. |
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.
Change looks good, should improve dark-theme Eclipse.
This change caused 3 test fails, please adopt either code or tests: eclipse-platform/eclipse.platform.ui#30 |
With only the output below to go on, it's a bit too hard for me to know what's going on.
I've spent the past 4h trying to get a runtime for the platform running (just so I could debug the UIComparePreferencesAuto unit-test. I see that there is another class called UIComparePreferences that requires some input from the user. I can run the UIComparePreferences class and it passes, but UIComparePreferencesAuto fails in my runtime with another error:
And yes, I'm running it as a "JUnit Plug-in Test" in Eclipse. What I can see is that the method DialogCheck#verifyCompositeText(Composite) might need a copy of the TabFolder block that does the same thing, but with the CTabFolder type instead. As I can't run the unit-test, I don't know if this will make a difference or what button has the label ">". If I manually look in the preference dialog, I do not see any button that has this string. @iloveeclipse: If you have a working runtime, can update DialogCheck#verifyCompositeText(Composite) to look like this and see if it helps with the UIComparePreferencesAuto test case? I think the other 2 failures are unrelated to the UI changes. private static void verifyCompositeText(Composite composite) {
Control children[] = composite.getChildren();
for (Control child : children) {
if (child instanceof TabFolder) {
TabFolder folder = (TabFolder) child;
int numPages = folder.getItemCount();
for (int j = 0; j < numPages; j++) {
folder.setSelection(j);
}
}
else if (child instanceof CTabFolder) {
CTabFolder folder = (CTabFolder) child;
int numPages = folder.getItemCount();
for (int j = 0; j < numPages; j++) {
folder.setSelection(j);
}
}
else if (child instanceof Button) {
//verify the text if the child is a button
verifyButtonText((Button) child);
}
else if (child instanceof Label) {
//child is not a button, maybe a label
verifyLabelText((Label) child);
}
else if (child instanceof Composite) {
//child is not a label, make a recursive call if it is a composite
verifyCompositeText((Composite) child);
}
}
} |
The method verifyCompositeText in DialogCheck verifies various aspects of composites, with eclipse-platform/eclipse.platform.team#14 this now needs to understand CTabFolder (in addition to TabFolder) Also-by: Torbjörn Svensson <torbjorn.svensson@st.com>
The method verifyCompositeText in DialogCheck verifies various aspects of composites, with eclipse-platform/eclipse.platform.team#14 this now needs to understand CTabFolder (in addition to TabFolder) Also-by: Torbjörn Svensson <torbjorn.svensson@st.com>
The method verifyCompositeText in DialogCheck verifies various aspects of composites, with eclipse-platform/eclipse.platform.team#14 this now needs to understand CTabFolder (in addition to TabFolder) Also-by: Torbjörn Svensson <torbjorn.svensson@st.com>
Contributed by STMicroelectronics
Signed-off-by: Torbjörn Svensson torbjorn.svensson@st.com