Skip to content
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

Unify settings pages components #37

Merged
merged 8 commits into from
May 7, 2023

Conversation

eLtMosen
Copy link
Member

@eLtMosen eLtMosen commented May 1, 2023

Unifiy the layouts of the components used on the settings pages to fixed font and icon size.
Give horizontal spacing/margin within the component so the full width of the screen can be used and must not be limited by margins given in the settings pages.

  • Move ListItem from asteroid-settings
  • Add LabeledActionButton analog to LabeledSwitch
  • Add HighlightBar used in LabeledSwitch
  • Refactor LabeledSwitch to fixed Dims.h(20) icon height and Dims.h(25) rowHeight
  • Refactor IntSelector to fixed Dims.h(20) icon height and Dims.h(25) rowHeight
  • Update qmldir and resource.qrc with new components

@eLtMosen eLtMosen force-pushed the unify-settings-components branch from f167143 to 60c4590 Compare May 1, 2023 21:46
eLtMosen added a commit to eLtMosen/asteroid-settings that referenced this pull request May 1, 2023
Goal is to make the use of font and icon size and row heigts consistent over all settings pages.
As well as to add a HighlightBar for visual feedback and make all rows clickable like in the settings main list.

- Remove PageHeader from Units, Display and Nighstand page
- Refactor all display, sound and nightstand value selectors into IntSelector
- Refactor nightstand page action button to LabeledActionButton
- Refactor all possible instances of switches into LabeledSwitch in Units, Display, Nighstand and Sound page.
- Remove margins from flickables so components can use the full screen width for the HighlightBar
- Set rowHeight of Dims.h(25) for all clickable rows
- Move ListItem component to qml-asteroid for consitency

Depends on AsteroidOS/qml-asteroid#37 to add and modify the components.

Signed-off-by: Timo Könnecke koennecke@mosushi.de
src/controls/qml/HighlightBar.qml Show resolved Hide resolved
src/controls/qml/HighlightBar.qml Outdated Show resolved Hide resolved
src/controls/qml/LabeledActionButton.qml Show resolved Hide resolved
src/controls/qml/ListItem.qml Outdated Show resolved Hide resolved
src/controls/qml/ListItem.qml Outdated Show resolved Hide resolved
src/controls/qml/LabeledSwitch.qml Outdated Show resolved Hide resolved
src/controls/qml/LabeledSwitch.qml Outdated Show resolved Hide resolved
Copy link
Member

@beroset beroset left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few additional suggestions.

src/controls/qml/LabeledActionButton.qml Outdated Show resolved Hide resolved
src/controls/qml/IntSelector.qml Outdated Show resolved Hide resolved
src/controls/qml/ListItem.qml Outdated Show resolved Hide resolved
@beroset
Copy link
Member

beroset commented May 4, 2023

Since this adds three new controls, would it make sense to bump the revision to 1.1?

@eLtMosen eLtMosen force-pushed the unify-settings-components branch 3 times, most recently from c906a26 to 71fbaba Compare May 5, 2023 19:41
Copy link
Member

@beroset beroset left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much cleaner and more elegant. Well done!

Copy link
Member

@MagneFire MagneFire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work!

Some minor questions / suggestions.

src/controls/qml/IntSelector.qml Show resolved Hide resolved
src/controls/qml/HighlightBar.qml Outdated Show resolved Hide resolved
src/controls/qml/HighlightBar.qml Outdated Show resolved Hide resolved
src/controls/qml/LabeledActionButton.qml Outdated Show resolved Hide resolved
eLtMosen and others added 8 commits May 7, 2023 23:34
- Bind onClick property to the parent
- Bind forceOn property to parent so the PowerPage can enforce highlight to generate radio button beaviour
- Use OutQuad easing so that the highlight is visible very fast after onPressed is registered. else it would not be visible on short presses.

Co-authored-by: Ed Beroset <beroset@ieee.org>
Signed-off-by: Timo Könnecke koennecke@mosushi.de
- Change hardcoded size definitions to global variables that have a sane defaults and can be altered in the component call
- Comment all added property variables and alias

Thanks to @beroset for help with the comments

Co-authored-by: Ed Beroset <beroset@ieee.org>
Signed-off-by: Timo Könnecke koennecke@mosushi.de
- revert receiving of functions through the onClicked property, to sending the signal clicked to the parent

Co-authored-by: Darrel Griët <dgriet@gmail.com>
Signed-off-by: Timo Könnecke koennecke@mosushi.de
@eLtMosen eLtMosen force-pushed the unify-settings-components branch from 78662c3 to e3b0572 Compare May 7, 2023 21:40
@eLtMosen eLtMosen merged commit f2b9dc4 into AsteroidOS:master May 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants