-
Notifications
You must be signed in to change notification settings - Fork 65
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
[WIP] SettingToggle Icon Support +Fixes #42
Comments
duraki
added a commit
to When-original-devs-wont-merge-good-PRs/Setting
that referenced
this issue
Jan 26, 2025
…sue via nillable horizontalPadding _ref aheze#42 This update fixes SettingToggle implementing Icons among other functionality (ref. aheze#42) - impl: edgePadding setter (optional) via env_var, otherwise uses horizontalPadding (default) - fixes: Icon padding issue (ref via nillable horizontalPadding (ref. [aheze/Setting/#2614139662](aheze#38 (comment))), covering aheze#38, aheze#37 - impl: SettingToggle extension supporting `.icon(...)` methods
duraki
added a commit
to When-original-devs-wont-merge-good-PRs/Setting
that referenced
this issue
Jan 26, 2025
…sue via nillable horizontalPadding _ref aheze#42 This update fixes SettingToggle implementing Icons among other functionality - impl: edgePadding setter (optional) via env_var, otherwise uses horizontalPadding (default) - fixes: Icon padding issue (ref via nillable horizontalPadding (ref. aheze#38 (comment), covers aheze#38, aheze#37 - impl: SettingToggle extension supporting `.icon(...)` methods - impl: SettingToggle `onChange(...)` event handler, triggering when toggle is switched on/off
Preview provided via: // SettingExample/PreferencesView.swift
struct PreferencesViews_Previews: PreviewProvider {
static var previews: some View {
PreferencesView()
}
} |
duraki
added a commit
to When-original-devs-wont-merge-good-PRs/Setting
that referenced
this issue
Jan 26, 2025
…ngToggle w. Icon + onChange(...) event _ref aheze#42 This change updates the Setting/SettingExample/PreferencesView showing how to use added icon support on SettingToggle, alongside the sample code which tracks toggle switch events and trigger onChange handler via closure Added Toggle switch example is rendered in "Extras" SettingGroup in "Preferences" tab: - SettingToggle `toggleIcon` (bool-based @AppStorage bindings) - SettingToggle `.icon(...)` example - SettingToggle `onChange(...)` example @duraki via _ref aheze#42
Hey @aheze, hope this small contrib helps you a bit. Thanks for open-sourcing and writing this package, really nice to use. I can't request MR for some reason, but the PR #43 implements this feature. I've tried to follow yours/repository codebase expectations as per previous pull requests and your commits. Cheers 🎉 |
duraki
added a commit
to When-original-devs-wont-merge-good-PRs/Setting
that referenced
this issue
Jan 26, 2025
…menu` _ref aheze#44 This small PR fixes bug in aheze#44 where the icon is not showing in SettingPicker component, when used in combination with `Setting.ChoicesConfiguration(pickerDisplayMode: .menu, ....)`: - Preappends `SettingIconView(...)` when using `.menu` picker's display mode - Requires merge of base PR @ aheze#43 & aheze#42 or cherry-picking
duraki
added a commit
to When-original-devs-wont-merge-good-PRs/Setting
that referenced
this issue
Jan 26, 2025
This feature implements icon support in SettingText and SettingTextField, following the _ ext ref: aheze#42
duraki
added a commit
to When-original-devs-wont-merge-good-PRs/Setting
that referenced
this issue
Jan 26, 2025
duraki
added a commit
to When-original-devs-wont-merge-good-PRs/Setting
that referenced
this issue
Jan 26, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is separate issue for tracking _original feature request in #24. There are few PR on this (ie. #38, #37) but both of them has issues due to not implementing nillable
horizontalPadding
. This issue should track my changes featuring both PR #38 & #37, but with additional options implementing:onChange(...)
event expecting closurehorizontalPadding
edgePadding
SettingButton
currently implements)Feature Showcase
The text was updated successfully, but these errors were encountered: