Skip to content

Fix Settings color picker - #1277

Merged
matthijseikelenboom merged 3 commits into
CodeEditApp:mainfrom
defaultdino:settings/colorpicker
May 29, 2023
Merged

Fix Settings color picker#1277
matthijseikelenboom merged 3 commits into
CodeEditApp:mainfrom
defaultdino:settings/colorpicker

Conversation

@defaultdino

@defaultdino defaultdino commented May 24, 2023

Copy link
Copy Markdown
Contributor

Add local state and onChange to SettingsColorPicker, to handle theme changes separately. Simplify Color extension on hexString

Description

I changed the SettingsColorPicker.swift and Color+HEX.swift. The SettingsColorPicker now has local state handling the color of the picker, and any change to this triggers a theme update via the passed binding. Prior implementation caused undefined behavior and sporadic color picker changes.

Changes to Color+HEX extension were only simplifications of existing code.

Related Issues

Checklist

  • I read and understood the contributing guide as well as the code of conduct
  • The issues this PR addresses are related to each other
  • My changes generate no new warnings
  • My code builds and runs on my machine
  • My changes are all related to the related issue above
  • I documented my code

Screenshots

Settings color picker
Colorpicker.mp4

…changes separately. Simplify Color extension on hexString
Comment thread CodeEdit/Utils/Extensions/Color/Color+HEX.swift
0xWDG
0xWDG previously approved these changes May 29, 2023

@0xWDG 0xWDG left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM, please fix the comment as matthijseikelenboom already said.

@defaultdino
defaultdino dismissed stale reviews from 0xWDG and matthijseikelenboom via 3ee1901 May 29, 2023 16:17
@matthijseikelenboom
matthijseikelenboom merged commit 9bdc058 into CodeEditApp:main May 29, 2023
@defaultdino
defaultdino deleted the settings/colorpicker branch May 29, 2023 21:49
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.

🐞 Color Picker Adjusts While Picking

3 participants