awesome-inc / FontAwesome.Sharp

A library for using Font Awesome in WPF & Windows Forms applications
Apache License 2.0
385 stars 89 forks source link

[=] IconPositiong fix #5, [+] icon flip/rotation #4 #6

Closed VoidVolker closed 6 years ago

VoidVolker commented 6 years ago

[=] IconPositiong fix #5, [+] icon flip/rotation #4

[=] IconPositiong fix #5 [+] icon flip/rotation #4 [+] Icons caching IconPictureBox rewrited, new properties: IconSize, UseIconCache, Flip, Rotation, ForeColor and BackColor New features: GDI rendering with image centering.

[-] ActiveColor / InActiveColor deprecation

VoidVolker commented 6 years ago

Strange, appveyor don't like this code:

if (!cache.TryGetValue(k, out Bitmap cachedImage))

Looks like it don't know out Bitmap cachedImage and its expects , after Bitmap: https://ci.appveyor.com/project/awesome-inc-build/fontawesome-sharp/build/4.8.0-PullRequest.6+6.build.43#L171

Fixed here: https://github.com/awesome-inc/FontAwesome.Sharp/pull/6/commits/d035dd1979b86768a6b883ad539a5976d8a3c6bd

VoidVolker commented 6 years ago

I have one more commit - small fix, will push it in monday. Meanwhile we can discuss current code.

mkoertgen commented 6 years ago

Looks good to me. I'll merge it into develop and probably add some sugar here and there.

I think the AppVeyor build failed because the build environment is restricted to VS2015 whereas you used "inline out scope" which requires C# 7 i think. I will update the build environment to VS2017

VoidVolker commented 6 years ago

Ok, good. I have updates for cache and IconPictureBox - will push tomorrow. There exists some critical bugs.

mkoertgen commented 6 years ago

I am just about to running ReSharper's auto-cleanup over the new code in develop. So maybe you will get some merge conflicts. Should be easy to resolve by pulling from upstream (awesome-inc/develop).

If you already commited, please try rebasing to enhance history (git pull -r).

mkoertgen commented 6 years ago

By the way, did you plan on to the ShouldSerialize... methods in IconPictureBox? Right now, these methods do not seem to be used. If not, i would tend to remove them.

VoidVolker commented 6 years ago

This methods are used by forms constructor/designer. They allow to disable code generation for properties in design time.

mkoertgen commented 6 years ago

added flip/rotate to common forms-interface. We should aim to implement this on the other forms-controls, too.

VoidVolker commented 6 years ago

Yeah, thanks. My current goal is make this new code to be stable and bugs free. Currently testing it in my current project with local build. And then extend new features to other controls. Also, as I sayd early - GDI+ have better aliasing support and I thinking to try implement tt template for icon size measuring before build and generate list with icons sizes/paddings.