-
Notifications
You must be signed in to change notification settings - Fork 40
Rework QuickSettings and rename to QuickPanel #180
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
base: master
Are you sure you want to change the base?
Conversation
dba5f92 to
fbea2d4
Compare
- Add dummy toggles for sound and settings shortcut - Add functionally working wifi toggle. Bug: item is not in toggled on color when wifi is active on startup of quicksettings - Place toggles into 2x3 grid - Order 1 row: brightness, sound, haptics - Order 2 row: wifi, bt, settings shortcut - Resize toggle items to Dims.l(26) and add Dims.(2) spacing to the grid - Implement batteryMeter - Add waveUp and waveDown animations to indicat charge/discharge - Fix wifiToogle initial state when powered on. Qt.callLater delays the initial sync until after wifiStatus has likely fetched its state from Connman
…mport before the nemo systemsettings import
- Implement two static spots at the top for stock placment of the lockbutton and new settings shortcut (WiP) - Use white for the batteryMeter fill to unify the look with the pageDots - Scale pageDots to regular Dims.l(4) size - Set lockbutton to toggled as default state - Place batteryMeter and chargeText back to the bottom like it was in current stock state
This commit adds the ability to launch other applications from QML by implementing an AppLauncher class that provides QML-accessible methods to start applications. Changes: - Added AppLauncher class directly in main.cpp with two methods: - launchApp(): Starts an application by name - launchDesktopFile(): Handles .desktop files by parsing the application name - Exposed AppLauncher to QML via context property appLauncher - Updated quickSettings.qml to use the new launcher for starting the settings app - Added appropriate error handling for application launching This allows for seamless integration with AsteroidOS app launching mechanism while using standard Qt functionality (QProcess) rather than relying on the Lipstick compositor directly.
… control Replaced the dummy soundToggleComponent, which only displayed a fixed ios-sound-indicator-high icon and constant toggled state, with a fully functional volume toggle. The new implementation: - Supports mute/unmute by swapping volumeControl.volume and preMuteLevel.value, preserving the previous volume for seamless restoration. - Dynamically updates the icon (mute, high, mid, low, off) based on volume level or mute state. - Plays unmuteSound on unmuting for audible feedback. - Syncs with external volume changes via Connections, ensuring UI consistency. - Initializes state based on preMuteLevel, with clean, production-ready code. This adds proper audio control to the QuickSettings UI, enhancing user interaction and system integration.
…lection from the new quickSettingsPage in asteroid-settings
Aligned QuickSettings.qml with QuickSettingsPage.qml by replacing 9 individual ConfigurationValue objects with two array-based ones at /desktop/asteroid/quicksettings/top and /desktop/asteroid/quicksettings/main. Updated topButtonsView and quickSettingsView to read from topToggles and mainToggles arrays, supporting dynamic toggle counts while preserving toggle behavior, duplicate filtering, horizontal swiping, battery meter, and visual styling. Ensured seamless integration with QuickSettingsPage.qml reordering.
Added toggleEnabled ConfigurationValue at /desktop/asteroid/quicksettings/enabled to QuickSettings.qml, matching QuickSettingsPage.qml. Updated topButtonsView and quickSettingsView to exclude toggles disabled by the user, integrating with existing toggleAvailable filtering. Preserved all toggle behaviors, visuals, and dynamic row grouping, ensuring disabled toggles do not appear in the UI.
Updated topToggles to [lockButton, settingsButton], removing empty slot. Modified topButtonsView to display exactly two toggles (width: toggleSize * 2, no scrolling), ensuring sync with QuickSettingsPage.qml’s two-item top row. Preserved filtering and visuals.
…uickSettings.qml Added user-configurable position toggle for battery meter and fixedRow in QuickSettings.qml, controlled by ConfigurationValue (/desktop/asteroid/quicksettings/batteryBottom, default true). Enables placement of batteryMeter, batteryPercentText, pageDots, and fixedRow above or below slidingRow using QML State and AnchorChanges: - Bottom position (batteryBottom: true): fixedRow anchors to slidingRow.top with bottomMargin: Dims.l(4) (16px); batteryMeter and pageDots anchor to slidingRow.bottom with topMargin: Dims.l(12) and Dims.l(4), respectively. - Top position (batteryBottom: false): fixedRow anchors to slidingRow.bottom with topMargin: 0 (workaround for 32px spacing bug); batteryMeter and pageDots anchor to slidingRow.top with bottomMargin: Dims.l(12) and Dims.l(4). Addressed a spacing bug where fixedRow had 32px spacing from slidingRow in top position (vs. 16px in bottom position). Setting topMargin: 0 in topPosition ensures consistent 16px spacing, pending further investigation into slidingRow layout. Added Connections block to handle batteryBottom value changes for robust state transitions. Preserved all toggle functionality, UI styles, and drag rules. Reduced fake press highlight transition to 100ms (from 200ms) for snappier toggle feedback.
…nToggles to sliderToggles, update configuration keys to align with QuickSettingsPage.qml, and ensure consistent nomenclature. No migration of old config values.
…and enhance battery visuals - Replaced batteryBottom ConfigurationValue with options object, including batteryBottom, batteryAnimation, and batteryColored booleans - Updated fixedRow, batteryMeter, batteryPercentText, pageDots, and Connections to use options.value.batteryBottom for positioning - Made batteryFill wave animation conditional on options.value.batteryAnimation and charger connection - Set batteryFill color to dynamic scheme when options.value.batteryColored is true: - 100% to 50%: Green (#00FF00) - 50% to 20%: Interpolate to orange (#FFA500) - 20% to 0%: Interpolate to red (#FF0000), with opacity animation (0.6 to 0.4, 500ms each way) when batteryAnimation is true, not charging, and battery < 30% - Added flashIcon opacity animation (1.0 to 0.6 and back, 1000ms each way) during charging - Fixed Connections to target options instead of batteryBottom - Corrected batteryFill opacity animation condition to use == for comparison
- Fix color sheme to actually show colors in between the defined solid colors - Set battery fill to constant 0.6 opacity - Set batteryPercentText to 0.6 and 0.9 opacity when charger connects - Set flashIcon to blink between 0.6 and 0.9 opacity when charger connects
…ion of the charging state
Extend the battery particle system with multiple design options: - Add selectable particle designs with a configurable particleDesign option - Include four distinct designs: diamonds, bubbles, logos, and flashes - Create design-specific visual properties (size, opacity) for each type - Implement a property dictionary to make designs individually configurable - Optimize animations with per-design targets and properties - Reduce non-charging particle lifetime to 1200ms for improved visual effect - Add fallback to diamonds if no design is specified in configuration This prepares for a future UI toggle in QuickSettingsPage to allow users to switch between different particle designs.
- Modified QuickSettings.qml to reference qrc:///org/asteroid/controls/qml/BatteryParticles.qml in batteryMeter’s particleContainer. - Ensured compatibility with existing particle creation logic for system-wide particle animations.
- Enhanced batteryMeter particle system: - Added speed-based movement (60px/s charging, 20px/s discharging) with clipBounds destruction. - Implemented horizontal spawn stratification (two halves, alternating). - Set dynamic spawn intervals: 200ms (charging), 750ms (discharging, doubled rate). - Adjusted lifetimes: 2500ms (charging, +50%), 8500ms (discharging, -15%). - Lowered particle maxOpacity to 0.6 and batteryFill RGBA alpha by 0.1.
Introduce 'RemorseTimer' QML component from 'org.asteroid.controls' for system-wide cancellable action countdowns, and integrate it with new 'powerOffToggle' and 'rebootToggle' in 'QuickSettings.qml'. The 'RemorseTimer' displays a semi-transparent overlay with a customizable 'SegmentedArc' gauge, action message, countdown label, and 'Tap to cancel' prompt, used for confirming critical actions.
'RemorseTimer' features:
- Configurable countdown via 'interval' property (default 3000ms).
- Customizable gauge with 'gaugeSegmentAmount' (default 6), 'gaugeStartDegree' (default -130), and 'gaugeEndFromStartDegree' (default 265).
- Smooth arc progression (0-100 'inputValue' range, ~500ms per segment for 6 segments).
- Precise second-by-second countdown (e.g., 3->1 for 3000ms) synchronized with arc.
- 300ms fade-in on start and fade-out on cancellation.
- Bold countdown label ('Dims.l(18)', 'SemiBoldCondensed') and action/cancel labels ('Dims.l(6)') with 'Dims.l(1)' margins.
- Translated messages using 'qsTrId' for i18n.
- 'triggered' and 'cancelled' signals for system integration.
'QuickSettings.qml' updates:
- Added 'powerOffToggleComponent' and 'rebootToggleComponent', using 'RemorseTimer' for power-off and reboot actions via 'login1DBus' calls.
- Configured 'RemorseTimer' with 'interval: 3000', 'gaugeSegmentAmount: 6', 'gaugeStartDegree: -130', and 'gaugeEndFromStartDegree: 265'.
- Included toggles in 'sliderToggles' configuration for user access.
These additions enhance AsteroidOS's quick settings with safe, user-confirmable power-off and reboot functionality, with plans for further 'RemorseTimer' use.
Signed-off-by: Timo Könnecke <[email protected]>
Introduce 'aodToggle' and fully flesh out 'cinemaToggle' in 'QuickSettings.qml', adding always-on display (AoD) control and a comprehensive cinema mode with state synchronization.
Changes:
- Added 'aodToggleComponent' to toggle AoD via 'alwaysOnDisplay' ('/org/asteroidos/settings/always-on-display') and 'displaySettings.lowPowerModeEnabled', with dynamic 'ios-watch-aod-on' and 'ios-watch-aod-off' icons from 'asteroid-icons-ion'.
- Enhanced 'cinemaToggleComponent':
- Toggles mute, brightness to 10, and AoD off on check; reverts to unmute, brightness 100, and restores pre-toggle AoD state when unchecked.
- Starts untoggled by default, enabling only if muted, brightness <= 10, and AoD off, with 'Connections' to untoggle on state mismatch.
- Handles unavailable 'soundToggle' ('DeviceInfo.hasSpeaker' false) by using 'volumeControl' directly.
- Syncs with 'brightnessToggle' by setting brightness to 100 on uncheck.
- Respects secondary LCD AoD status pre-toggling by storing 'alwaysOnDisplay.value' in 'preAodToggled' ('/desktop/asteroid/quicksettings/pre-aod-toggled').
- Added 'ConfigurationValue' for 'alwaysOnDisplay' and 'preAodToggled', and updated 'toggleEnabled' to include 'aodToggle'.
- Inserted 'aodToggle' before 'powerOffToggle' in 'toggleRegistry' and 'sliderToggles'.
- Exposed 'cancelText' in 'RemorseTimer' and handled 'id-tap-to-cancel' translation for 'powerOffToggle' and 'rebootToggle'.
- Update Translations
…ents to launch asteroid-music and asteroid-flashlight
…ong-press functionality: - Implement click-to-toggle between 0 and 100 (to 0 only from 100, else to 100). - Add long-press to adjust brightness in 10-unit steps every 300ms, covering 0 to 100 in ~3 seconds. - Persist last press-and-hold direction to continue increasing/decreasing until reaching 0 or 100. - Ensure immediate stop on release using isReleased flag to prevent post-release changes. - Update toggle icon state to show active when brightness > 10.
- Swapped batteryMeter Item with ValueMeter component from org.asteroid.controls, generalizing the battery display for future use with brightness or sound values. - Moved battery-specific color logic (green/yellow/red gradient) to ValueMeter's fillColor property, controlled by options.value.batteryColored. - Renamed internal components (batteryOutline, batteryFill) to generic terms via ValueMeter. - Updated anchoring references in batteryPercentText, flashIcon, and Connections to use valueMeter. - Preserved battery-related logic (batteryChargePercentage, mceChargerType) for default behavior.
…htness during press-and-hold - Modified valueMeter in QuickSettings.qml to display brightnessToggle values during press-and-hold, using a purple fill color and disabling isIncreasing/animations for clarity. - Added showingBrightness property and resetTimer to valueMeter to revert to battery display after 2 seconds. - Renamed batteryPercentText to valueMeterCaption, showing Brightness during press-and-hold and battery percentage otherwise, with opacity transitions. - Updated brightnessToggle to trigger valueMeter and valueMeterCaption updates via showInValueMeter function during press-and-hold and timer steps. - Added opacity Behavior to valueMeter and valueMeterCaption for smooth transitions.
- Modified soundToggle to support granular 10-unit volume steps via press-and-hold, with unmute handling and direction persistence during active sessions. - Added showingVolume property to valueMeter and valueMeterCaption to display volume with a blue fill color (#4C9800A6) and Volume text during press-and-hold. - Updated soundToggle to trigger valueMeter and valueMeterCaption updates via showInValueMeter, ensuring mutual exclusivity with brightness display. - Added volumeValue property to valueMeter for safe volume binding, updated by soundToggle during volume changes. - Implemented fade-in/out animations with resetTimer, fadeOutTimer, and fadeInTimer to transition between brightness, volume, and battery modes. - Added opacity (250ms) and fillColor (300ms) Behaviors for smooth transitions, with textFadeInTimer for valueMeterCaption text changes. - Updated valueMeter fillColor to respect options.value.batteryColored, using white fill for brightness and volume when disabled, and changed brightness fill to #4CA6005F. - Adjusted valueMeterCaption opacity dodge to 0.8 (no charger) and 1.0 (charger present). - Added notification sound playback on press-and-hold release for soundToggle when volume is non-zero, providing audio feedback for new volume setting. - Added 150ms delay timer for unmuteSound playback to prevent cut-off during mute toggle and ensure full playback on unmute and press-and-hold release. - Updated brightnessToggle press-and-hold to enforce a minimum brightness of 10, aligning with cinemaMode and click toggle logic. - Added resetDirection signal in valueMeter to reset soundToggle and brightnessToggle press-and-hold direction to increment after reverting to battery display, improving UX by defaulting to increasing values. - Removed debug logs from soundToggle, brightnessToggle, and valueMeter for commit readiness.
- Added Behavior on valueMeter.value with 250ms NumberAnimation and InOutQuad easing to smoothly animate fill width transitions for volume, brightness, and battery percentage changes. - Restored valueMeter.enableAnimations to options.value.batteryAnimation && !(showingBrightness || showingVolume), ensuring particle animations are exclusive to battery mode while fill width animates for all modes.
…emove development comments
This commit introduces a continuous adjustment cycle for the brightness and volume controls when the user performs a press-and-hold gesture. Instead of stopping at the minimum (0) or maximum (100) value, the adjustment will now:
- Reach the limit.
- Pause for 1 second.
- Reverse direction (increase/decrease).
- Continue adjusting in 10-unit steps until the opposite limit is reached.
This provides a more fluid and intuitive user experience for fine-tuning brightness and volume.
The following changes were made:
- Remove development comments
- Update Weblate translations
- Added a 'directionChangeTimer' to both 'brightnessToggleComponent' and 'soundToggleComponent' to manage the delay and direction reversal.
- Modified the 'onTriggered' handler of the adjustment timers ('brightnessHoldTimer', 'volumeHoldTimer') to trigger the 'directionChangeTimer' at the limits instead of stopping.
- Implemented the 'directionChangeTimer''s 'onTriggered' handler to flip the adjustment direction ('isIncreasing') and restart the adjustment timer.
- Updated the 'MouseArea''s 'onReleased' handler to stop both the adjustment timer and the direction change timer, ensuring the cycle terminates when the user releases the press.
fbea2d4 to
1841638
Compare
…-settings items to the Panel
| <location filename="../qml/firstrun/Tutorial.qml" line="124"/> | ||
| <source>are on the right.</source> | ||
| <translation>Haten deg uyeffus.</translation> | ||
| </message> |
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.
What happened here? For some reason this file doesn't have any of the new translations?
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.
I am not sure at all. I hoped those issues would just go away when i rebase onto recent master to pull the latest translations and then run the qt translation tool again? I planned that as last step before merge since translations are moving quite fast. But maybe i do not understand your point, eheh
| <source>are on the right.</source> | ||
| <translation>вни изправа.</translation> | ||
| </message> | ||
| <message id="id-tutorial-quicksettings-title"> |
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.
Same here? It's missing new translations...
| // But for simplicity, let's just append to a common path | ||
| QString appName = desktopFile; | ||
| if (appName.endsWith(".desktop")) { | ||
| appName.chop(8); // Remove .desktop suffix |
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.
Wouldn't it be nicer to just get the length of the .desktop suffix .i.e.: strlen(".desktop")
In this case you could also consider moving the extension suffix to a separate variable/define/constexpr
| app.mainWindowInstance()->showFullScreen(); | ||
| return app.exec(); | ||
| } | ||
|
|
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.
New line removed. Isn't it nicer to have an empty line as the last line (Unix thing)
| } | ||
| } | ||
|
|
||
| Component { |
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.
This file is huge would it be possible to move the toggles to a dedicated .qml. That way reduce the size of this file and we can potentially use a more dynamic solution in the future (like watchfaces/applauncher)
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.
If we want to use them in other context, would it make sense to move them to asteroid.utils in qml-asteroid?
Or do you mean to just put them in separate .qml next to the quickpanelPage.qml?
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.
If we want to use them in other context, would it make sense to move them to asteroid.utils in qml-asteroid?
No, these toggles are not generic enough to be part of our qml library. They should remain as part of the launcher.
Or do you mean to just put them in separate .qml next to the quickpanelPage.qml?
Originally I was thinking to create a .qml for every toggle (i.e. RebootToggle.qml, PowerOffToggle.qml). Pretty much exactly how the settings app works: https://github.com/AsteroidOS/asteroid-settings/blob/d1a759844b1070b94a134b876a110acae4ff1599/src/qml/main.qml#L31. You still need to define a list of Component toggles, but their implementation is hidden to some other file.
Then if we want to eventually reuse them (in the far future) we can just install all these toggles under /usr/share/asteroid-launcher/quickpanel/
Rework QuickSettings.qml for Enhanced Customization and UX in asteroid-launcher
This pull request overhauls
QuickSettings.qmlin theasteroid-launcherrepository, delivering a redesigned QuickSettings panel for AsteroidOS. While staying fully backwards compatible with no feature regression in function and design over our 10 years old UX many users are familiar with and grew to like. The redesign introduces a flexible, user-customizable interface with a two-row layout, advanced toggle/button interactions, and visual enhancements, all seamlessly integrated with the newQuickSettingsPage.qmlinasteroid-settings. The changes leverage newqml-asteroidcomponents (ValueMeter,Particles,RemorseTimer,OptionsCycler) to provide a polished, touch-friendly smartwatch UX. Below, we detail the new panel features and the revamped toggle/button components.This PR depends on:
AsteroidOS/qml-asteroid#58 to add the necessary components to qml-asteroid.
AsteroidOS/asteroid-settings#100 to provide a settings page for the new user defined order logic.
Already merged:
AsteroidOS/asteroid-icons-ion#23 added a quicksetting logo in two variants to reflect the optional vertical mirrored orientation of the QuickSettings panel layout.
AsteroidOS/asteroid-icons-ion#25 added a Always on Display icon used in the aodToggle.
Issues adressed:
Resolves #116 by implementiong all mentioned features while retaining the lockButton feature.
Resolves AsteroidOS/asteroid-settings#45 by adding granular adjustment of the brightnessToggle via PressedAndHold.
Resolves AsteroidOS/asteroid-settings#76 by adding the soundToggle with mute/unmute option via checked/unchecked state additional to the PressAndHold granular volume adjustment.
Resolves AsteroidOS/asteroid#232 by adding a musicToggle, giving users faster access to the asteroid-music application.
Prepares AsteroidOS/asteroid-sounds#2 inclusion of sound files in the stock delivery.
Prepares AsteroidOS/asteroid-settings#32 UI for wifi setup by offering a wifiToggle to conveniently toggle wifi powered state on demand.
Prepares AsteroidOS/meta-smartwatch#168 by limiting the lower bound of screenbrightness to 10 units in brightnessToggle and cinemaToggle. Adjustment in DisplayPage may be needed to complete this issue
Aids AsteroidOS/asteroid#166 by offering a customizable QuickSettings panel
Adds C++ helper class appLaunchHelper
This new class aims to start apps while in asteroid-launcher context to enable the settingsButton and other app start link buttons.
New Features of QuickSettings.qml Panel
1. Adaptive Two-Row Layout
The panel adopts a dynamic two-row structure with a fixed row (up to two toggles/buttons) and a sliding row (multiple toggles in pages of three). The
batteryBottomconfiguration option allows users to position theValueMeter(battery/volume/brightness meter) and its caption either above or below the sliding row, with the fixed row adjusting accordingly. This ensures optimal screen space usage and user preference flexibility.Implementation: Uses
ListViewcomponents (fixedRow,slidingRow) withAnchorChangesandstatesto reposition elements based onoptions.value.batteryBottom. Configuration is stored inNemo.Configurationand synced viaConnectionstooptions.2. Customizable Visuals with Animations and Colors
Users can enable/disable particle animations (

batteryAnimation) and colored fills (batteryColored) for theValueMeter, with particle designs ("diamonds", "bubbles", "logos", "flashes") selectable viaQuickSettingsPage.qml. These options enhance visual feedback, especially during battery charging, with smooth transitions for fill (250ms,InOutQuad), opacity (250ms), and color (300ms).Implementation:
ValueMeterintegratesParticlesfor animations, withBehavioronfillColorandopacityfor transitions. Settings are stored inoptionsand applied dynamically.3. Fixed Row for Persistent Access
The fixed row displays up to two toggles/buttons, intended for high-priority actions (e.g.,
lockButton,settingsButton) but also supporting toggles. Users can reduce it to one toggle by disabling a fixed row toggle inQuickSettingsPage.qml, ensuring at least one remains active. This provides quick access to essential functions without scrolling.Implementation:
fixedRowListViewwith aRepeaterloads components fromfixedTogglesconfiguration, limited to two items, with availability checks viatoggleRegistryandtoggleEnabled.4. Sliding Row with Paged Navigation
The sliding row organizes toggles into pages of three, navigable via swipe gestures and indicated by
PageDotcomponents. A minimum of two toggles is shown on the first page, ensuring usability even with sparse configurations. Pages snap to items (snapMode: ListView.SnapOneItem) for precise control.Implementation:
slidingRowListViewuses a dynamicmodelslicingsliderTogglesinto groups of three, withcontentXChangedupdatingcurrentIndexforPageDotsynchronization.5. Dynamic Toggle Management
Toggles/buttons are managed via
fixedToggles,sliderToggles, andtoggleEnabledconfigurations, synced withQuickSettingsPage.qml. Only available toggles (e.g.,wifiToggleif WLAN exists) are shown, with sorting by availability and user-defined order. This ensures a clutter-free, device-specific interface.Implementation:
toggleRegistrymaps toggle IDs to components, withallTogglesfiltering by availability (DeviceInfo) andtoggleEnabled. Configurations are updated viaNemo.Configuration.6. Enhanced Visual Feedback
The panel features a
ValueMeterfor battery, volume, or brightness, with context-aware captions and color-coded fills (e.g., green >50%, red <20% for battery). Charging states trigger a flashingios-flashicon with infinite opacity animation (1500ms,InOutQuad).RemorseTimerprovides confirmation for critical actions (e.g., power-off).Implementation:
ValueMeterusescurrentValuebindings and timers (resetTimer,fadeOutTimer,fadeInTimer) to switch modes.flashIconusesSequentialAnimationfor charging feedback.Reworked Toggle and Button Components
1. brightnessToggleComponent
Core Feature: Toggles screen brightness (10%, 100%) with press-and-hold for fine-grained adjustment in 10-unit steps. Lower bound at 10 to prevent completely dark screen when automatic display brightness is off or unavailable.
Additional Functionality: Maintains direction persistence (
lastDirection) for continuous adjustments, resetting to increasing after 2s viavalueMeter.resetDirection. Shows brightness inValueMeterduring interaction.Implementation:
MouseAreawith 300mspressAndHoldIntervaltriggersbrightnessHoldTimer(300ms repeat), updatingdisplaySettings.brightness.showInValueMetermanagesValueMetertransitions with fade effects.2. hapticsToggleComponent
Core Feature: Toggles vibration between "general" (on) and "silent" (off) profiles with haptic feedback.
Implementation: Sets
profileControl.profileand triggersdelayTimer(125ms) forNonGraphicalFeedbackon activation. Initialized viaComponent.onCompletedbased on current profile.3. wifiToggleComponent
Core Feature: Toggles Wi-Fi power state with dynamic icon (
ios-wifiwhen connected,ios-wifi-outlineotherwise).Additional Functionality: Syncs with
wifiStatus.poweredand updates onpoweredChanged.Implementation: Binds
toggledtowifiStatus.powered, withConnectionstowifiStatusfor real-time updates. UsesQt.callLaterfor initial state sync.4. bluetoothToggleComponent
Core Feature: Toggles Bluetooth power state with dynamic icon (
ios-bluetooth-connectedwhen connected,ios-bluetoothotherwise).Implementation: Sets
btStatus.poweredand syncstoggledwithbtStatus.poweredviaBluetoothStatus.onPoweredChanged.5. soundToggleComponent
Core Feature: Toggles mute/unmute with press-and-hold for volume adjustment in 10-unit steps.
Additional Functionality: Displays volume in
ValueMeterduring adjustment, with dynamic icons (ios-sound-indicator-high/mid/low/off/mute) based on volume level. PlaysunmuteSound(150ms delay, 0.8 volume) on unmute. Persists pre-mute volume (preMuteLevel).Implementation:
linearVolumeandtoPulseVolumeconvert between linear (0–100) and pulse audio scales.MouseAreawith 300mspressAndHoldIntervaltriggersvolumeHoldTimer(300ms repeat).showInValueMetermanagesValueMetertransitions.ConnectionstovolumeControlandpreMuteLevelupdate state and icon.6. cinemaToggleComponent
Core Feature: Toggles cinema mode, muting sound, setting brightness to 10%, and disabling always-on-display (AoD).
Additional Functionality: Restores pre-cinema states (volume, brightness, AoD) on deactivation. Syncs state based on mute, brightness, and AoD conditions.
Implementation: Stores
preCinemaAodStateandpreMuteLevel.ConnectionstopreMuteLevel,displaySettings, andalwaysOnDisplayupdatetoggled. UsesDeviceInfo.hasSpeakerfor sound handling.7. lockButtonComponent
Core Feature: Triggers low-power mode (LPM) display state.
Implementation: Non-toggleable button calls
mce_dbus.req_display_state_lpmon activation. Fixedtoggled: truefor consistent appearance.8. settingsButtonComponent
Core Feature: Launches the
asteroid-settingsapp.Implementation: Non-toggleable button calls
appLaunchHelper.launchApp("asteroid-settings")on activation. Fixedtoggled: true.9. musicButtonComponent
Core Feature: Launches the
asteroid-musicapp.Implementation: Non-toggleable button calls
appLauncherHelper.launchApp("asteroid-music")on activation. Fixedtoggled: true.10. flashlightButtonComponent
Core Feature: Launches the
asteroid-flashlightapp.Implementation: Non-toggleable button calls
appLauncherHelper.launchApp("asteroid-flashlight")on activation. Fixedtoggled: true.11. aodToggleComponent
Core Feature: Toggles always-on-display (AoD) and low-power mode.
Additional Functionality: Updates icon (
ios-watch-aod-on/off) based on state. Syncs withalwaysOnDisplay.value.Implementation: Sets
alwaysOnDisplay.valueanddisplaySettings.lowPowerModeEnabled.ConnectionstoalwaysOnDisplayupdatetoggledand icon.12. powerOffToggleComponent
Core Feature: Initiates system power-off with a 3-second
RemorseTimerconfirmation.Implementation: Triggers
remorseTimerwith translatableqsTrId("id-power-off")andqsTrId("id-tap-to-cancel"). On completion, callslogin1DBus.PowerOff.13. rebootToggleComponent
Core Feature: Initiates system reboot with a 3-second
RemorseTimerconfirmation.Additional Functionality: Shows translatable "Rebooting in" and "Tap to cancel" prompts, cancellable by tap. Sets
login1DBus.SetRebootParameterand callsReboot.Implementation: Non-toggleable
QuickSettingsTogglestartsremorseTimerononChecked, withonTriggeredconnecting tologin1DBuscalls.Changes
QuickSettings.qmlwith adaptable layout (batteryBottom), configurable animations (batteryAnimation,batteryColored), and paged sliding row navigation.ValueMeterintegration).qml-asteroidcomponents (ValueMeter,Particles,RemorseTimer,OptionsCycler) for polished UX.QuickSettingsPage.qmlinasteroid-settingsfor toggle reordering and enable/disable functionality.Commit Notes
This PR completely revamps the QuickSettings panel, offering unprecedented customization and a polished UX for AsteroidOS users. Please review and provide feedback!