Simplify and standardize size and spacing properties - #547
Merged
Conversation
…04 for consistency
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors QML sizing/spacing to come from a single Theme.spacing object and removes the standalone Sizes.qml singleton, aiming to standardize layout constants across UI components.
Changes:
- Added
Theme.spacingand updated font sizing inTheme.qmlto reference it. - Removed
source/Theme/Sizes.qmland dropped it from the Theme QML module sources. - Replaced
Sizes.*usages withTheme.spacing.*across Pages/Molecules/Atoms.
Testing:
- Not provided.
Reviewed changes
Copilot reviewed 20 out of 20 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| source/Theme/Theme.qml | Introduces Theme.spacing and switches font sizing to use it. |
| source/Theme/Sizes.qml | Removes the legacy singleton sizing definitions. |
| source/Theme/CMakeLists.txt | Stops exporting Sizes.qml in the Theme QML module. |
| source/Pages/Settings/NetworkSettings.qml | Migrates layout spacing/padding to Theme.spacing.*. |
| source/Pages/Settings/Database.qml | Migrates page column spacing to Theme.spacing.*. |
| source/Pages/GroupsList.qml | Migrates page padding to Theme.spacing.*. |
| source/Molecules/TermInfoDrawer.qml | Migrates drawer paddings to Theme.spacing.*. |
| source/Molecules/SideMenuHeader.qml | Migrates icon/button sizing to Theme.spacing.*. |
| source/Molecules/SearchDrawer.qml | Migrates left padding to Theme.spacing.*. |
| source/Molecules/NotificationDrawer.qml | Migrates text paddings to Theme.spacing.*. |
| source/Molecules/HelpView.qml | Migrates indicator diameter to Theme.spacing.*. |
| source/Molecules/EdgeHardeningDrawer.qml | Migrates text padding/top/bottom padding to Theme.spacing.*. |
| source/Atoms/ToolButton.qml | Migrates default toolbutton size to Theme.spacing.*. |
| source/Atoms/SquareButton.qml | Migrates implicit height to Theme.spacing.*. |
| source/Atoms/SideMenuButton.qml | Migrates paddings/spacing/sizing to Theme.spacing.*. |
| source/Atoms/ScrollIndicator.qml | Migrates thickness sizing to Theme.spacing.*. |
| source/Atoms/RoundButton.qml | Migrates default round button size to Theme.spacing.*. |
| source/Atoms/PageHeader.qml | Migrates toolbar height to Theme.spacing.*. |
| source/Atoms/FlickableColumn.qml | Migrates column spacing to Theme.spacing.*. |
| source/Atoms/DrawerPage.qml | Migrates drawer paddings to Theme.spacing.*. |
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
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.
Refactor size and spacing properties across components to use a consistent theme. Remove the Sizes.qml file and simplify calculations for better maintainability and clarity.