-
-
Notifications
You must be signed in to change notification settings - Fork 106
Improved UI #579
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
GHOST3118
wants to merge
11
commits into
MihailRis:dev
Choose a base branch
from
GHOST3118:improved-ui
base: dev
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
Improved UI #579
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
…element properties
…y styles to UINodes
- Introduced `StyleContext` class to manage UI element styles, including tag, ID, classes, and states. - Implemented methods for adding, removing, and checking classes and states within `StyleContext`. - Added functionality to synchronize `StyleContext` with associated `UINode`. - Created `Stylesheet` class to manage style rules and selectors, including parsing CSS-like rules. - Enhanced `value` class to support various data types and added factory methods for creating values from strings. - Implemented `StylesheetParser` for parsing CSS strings into style rules and properties. - Improved type safety and organization of style-related code with enums and structured classes.
- Removed the StylesheetParser.h file as it was no longer needed. - Updated value.cpp to remove an unnecessary return statement in the Hash operator. - Implemented Node class in Node.cpp and Node.hpp for XML node representation, including methods for child management, attribute handling, and searching by tag/path. - Added CSSSelectorParser class in SelectorParser.cpp and SelectorParser.hpp for parsing CSS selectors, including support for combinators and pseudo-classes. - Introduced StylesheetParser class in StylesheetParser.hpp for parsing stylesheets, including rules and declarations. - Created a test CSS file (test.css) with a basic style rule.
- Added root property to Node structure to identify root nodes. - Implemented methods in ElementData for managing ID and class attributes: - getId, setId for ID management. - getClassList, setClassList, addClass, removeClass, hasClass, toggleClass for class management. - Updated Node class to include is_root method. - Introduced ComputedStyle structure in Stylesheet for managing CSS properties. - Created DeclarationParser for parsing CSS declarations. - Implemented StyleComputer for computing styles based on stylesheets and node structure. - Enhanced StylesheetParser to support parsing of stylesheets with improved error handling.
- Consolidated layout computation logic into a single method, `compute_layout`, improving readability and maintainability. - Removed the `apply_styles_to_layout` method and integrated its functionality directly into the layout computation process. - Enhanced the handling of text layout by calculating dimensions based on font size. - Introduced a new `LayoutContext` structure to manage layout context more effectively. - Updated `LayoutBox` to simplify its structure, focusing on essential properties for layout calculations. - Improved the handling of child layout computations, allowing for better flexibility in layout direction (vertical/horizontal). - Refined style value handling in `value.cpp` and `value.h`, ensuring consistent type management and default values. - Adjusted color handling to default to transparent instead of opaque in `asColor` method.
… updated structure
…measurement and positioning
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.
Переработка подсистемы UI.
Готовый функционал и фичи:
В планах:
Планы: