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

Push &EventState into DrawHandle; remove DrawCtx #292

Merged
merged 16 commits into from
Mar 8, 2022
Merged

Push &EventState into DrawHandle; remove DrawCtx #292

merged 16 commits into from
Mar 8, 2022

Conversation

dhardy
Copy link
Collaborator

@dhardy dhardy commented Mar 8, 2022

Fixes:

  • EditField: do not show cursor if not editable
  • EditField: do not flash cursor if window is inactive
  • ComboBox: use accent color when depressed or focussed

Changes:

  • Push &EventState into DrawHandle and pass &WidgetId in methods, allowing calculation of event state in theme code as required
  • Add CheckBox::Editable state
  • Add WidgetId::parent()
  • Remove per-widget disabled flag; instead add list of disabled widgets in EventState. Events targetting disabled widgets or their descendants will now automatically be sent to the parent of the disabled widget instead.
  • Remove DrawCtx. Instead add IdRect and IdCoord allowing easy parameterisation of methods from any &W where W: Widget or &CoreData.
  • Add kas_core::theme::Background enum passed to DrawHandle::frame

@dhardy dhardy merged commit 00128f3 into master Mar 8, 2022
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.

1 participant