GithubHelp home page GithubHelp logo

newicon's People

Contributors

auramagi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

newicon's Issues

Taking View capture with cacheDisplay is buggy

These are current view capture steps:

  1. Add template View to NSHostingController
  2. Add it to a custom NSWindow
  3. Save as image with cacheDisplay(in:to:)

However, using cacheDisplay produces some side-effects and the resulting image does not exactly match View as displayed.

To get around some display issues, we tell SwiftUI to first flatten view hierarchy by itself using the drawingGroup modifier.

But even this has some weirdness, especially with blend modes. First of all, it loses all transparency, but that part is at least consistent with previews/actual rendering after using drawingGroup.

Using .overlay(Color.mint.blendMode(.hue)):

We can get around that by masking the result with the initial view:

@ViewBuilder public func hue(_ color: Color) -> some View {

But this still leaves us with incorrectly blended color in some parts.

Compare to how this looks in previews and when displayed in a window.

Support for dark mode OFF

Unreadable when dark mode is disabled.


as is:
text is difficult to read

image


to be:
text can be read


environment:
Dark mode OFF

Mac OS 12.3.1(21E258)

❯ mint run auramagi/NewIcon -h
🌱 Finding latest version of NewIcon
🌱 Running new-icon 0.1.1...
OVERVIEW: macOS icon customization

❯ mint version
Version: 0.17.1

❯ swift --version
swift-driver version: 1.45.2 Apple Swift version 5.6 (swiftlang-5.6.0.323.62 clang-1316.0.20.8)
Target: arm64-apple-macosx12.0


to reproduce:

❯ mint run auramagi/NewIcon text /Applications/Xcode-13.3.1.app 13.3.1 
🌱 Finding latest version of NewIcon
🌱 Running new-icon 0.1.1...

workaround:
Dark mode ON
Rerun!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.