forked from eclipse-platform/eclipse.platform.swt
-
Notifications
You must be signed in to change notification settings - Fork 7
[WiP] Wrapper layer for widgets #181
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
Draft
HeikoKlare
wants to merge
375
commits into
master
Choose a base branch
from
rebased-facade
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Produces consistent height results independent of button text
for checkbox, radio button and arrow button
…ating the renderers
The transparency flag and argument of SkijaGCs drawText methods have not been considered. With this change, the background of the text is drawn if the transparent flag is not set as defined by the API.
Currently, the Text widget based on CSimpleText uses the original (native) GC. With this change, it performs rendering based on a SkijaGC if enabled.
Set it in Drawing::getTextExtent
… to Control to allow Composites, too
because some implementations will need size hint arguments
* Fix multi-line anchor tag issue. Anchor tag within a link text can have new line character(\n). Link should be underlined in multiple lines. Other improvements. See #154 * Link widget re-factoring. Extract rendering logic as a DefaultLinkRenderer. Extract parse logic as a testable method and add unit test. * Link: renderer can be final (for now) * Link: move check for size from Renderer to Link Later it should be part of Drawing.drawWithGC * Link: single-line-if-checks without {} * LinkExample: tiny fixes * LinkRenderer.TextSegment: simplified * Link: introduce LinkRenderer.isOverLink no need to handle internals of LinkRenderer in Link * LinkRenderer: fix parseLinkText * DefaultLinkRenderer: remove useless + * DefaultLinkRenderer: removed code that introduced too large space --------- Co-authored-by: Thomas Singer <[email protected]>
* Initial implementation of slider widget. * Slider widget re-factoring into a SliderRenderer. All the review comments are fixed. * Decouple event handling and rendering for Slider widget. Event handling is handled by widget and rendering is handled by renderer. * SliderExample: small fixes * Slider: tiny code fixes * further drawing fixes * Minor drawing improvements. --------- Co-authored-by: Thomas Singer <[email protected]>
Text only subclasses CSimpleText without the latter being used independently. This merges the two classes.
Test Results 136 files - 205 136 suites - 205 1m 23s ⏱️ -58s For more details on these failures and errors, see this check. Results for commit b18fa00. ± Comparison against base commit 14ba19d. This pull request removes 61 tests.This pull request skips 43 tests.♻️ This comment has been updated with latest results. |
1fd38b9 to
5ed4b24
Compare
Makes the widget hierarchy a facade/wrapper API for potentially different actual implementations of widgets. Adapt GTK implementation to Widget facade API Adapt Cocoa implementation to Widget facade API Extract IWidget, IControl, and other interfaces Remove native-specific parts from API methods of native classes
5ed4b24 to
5c5c7d3
Compare
3d97fac to
aa02556
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
❗ This is work in progress only for demonstration purposes.
This introduces a wrapper layer for widgets (see #81 (comment)), making the API widgets only wrapper objects for actual implementations either based on OS-native wrappers or based on custom implementations.
The wrapper has been implemented consistently across all OSes for upstream SWT in this branch: https://github.com/swt-initiative31/prototype-skija/tree/facade
This PR contains a rebase of those changes onto the Skija development state. It is currently only adapted for Windows.
Contributes to #81