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

Add support for Font to Button and Entry #448

Closed
wants to merge 8 commits into from

Conversation

mattleibow
Copy link
Member

Description of Change

Implements the Font property (family, size, attributes) on Button and Entry. After the IFont was merged into IText in #416, we need to implement the other handlers that implement IText.

Additions made

  • Adds Font property map to ButtonHandler and EntryHandler
  • Adds Font mapping methods to ButtonHandler and EntryHandler for Android and iOS
  • Adds extension methods to apply Font to ButtonHandler and EntryHandler on Android and iOS
  • Adds DeviceTests for initial Font values to IButton and IEntry on iOS and Android

PR Checklist

  • Targets the correct branch
  • Tests are passing (or failures are unrelated)
  • Targets a single property for a single control (or intertwined few properties)
  • Adds the property to the appropriate interface
  • Avoids any changes not essential to the handler property
  • Adds the mapping to the PropertyMapper in the handler
  • Adds the mapping method to the Android, iOS, and Standard aspects of the handler
  • Implements the actual property updates (usually in extension methods in the Platform section of Core)
  • Tags ported renderer methods with [PortHandler]
  • Adds an example of the property to the sample project (MainPage)
  • Adds the property to the stub class
  • Implements basic property tests in DeviceTests

@hartez hartez force-pushed the font-consolidation branch from ee39526 to b9250df Compare March 9, 2021 21:48
Base automatically changed from font-consolidation to main March 10, 2021 17:40
@hartez hartez force-pushed the dev/button-entry-font branch from 1866fbd to 65e1007 Compare March 11, 2021 23:45
@rmarinho
Copy link
Member

I see this on the build logs, why don0't the other builds fail?

/Users/runner/work/1/s/src/Core/src/Platform/iOS/ButtonExtensions.cs(37,17): error CS1061: 'UIButton' does not contain a definition for 'Font' and no accessible extension method 'Font' accepting a first argument of type 'UIButton' could be found (are you missing a using directive or an assembly reference?) [/Users/runner/work/1/s/src/Core/src/Core-net6.csproj]

@hartez
Copy link
Contributor

hartez commented Mar 12, 2021

I see this on the build logs, why don0't the other builds fail?

/Users/runner/work/1/s/src/Core/src/Platform/iOS/ButtonExtensions.cs(37,17): error CS1061: 'UIButton' does not contain a definition for 'Font' and no accessible extension method 'Font' accepting a first argument of type 'UIButton' could be found (are you missing a using directive or an assembly reference?) [/Users/runner/work/1/s/src/Core/src/Core-net6.csproj]

I'm guessing it's because Font is deprecated; we should be using UIButton.TitleLabel.Font. I'm fixing it now.

@hartez hartez closed this Mar 12, 2021
@ghost ghost added the legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor label Jul 10, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Dec 27, 2023
@Eilon Eilon removed the legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor label May 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants