Giter Club home page Giter Club logo

Comments (6)

birbilis avatar birbilis commented on July 20, 2024 1

what I was meaning is that FMX has a service to get dark mode info (but not notification for it switching I think) for OS-X, iOS, Android but not for Windows. Such platform services are defined as interfaces and then concrete implementations per platform are provided. The client just asks FMX for an FMX service interface implementation for the current platform and it checks if one has been registered for the current platform/architecture and returns it. So the missing Windows bits could be taken from your implementation and have a full FMX implementation for all platforms (ok, apart from Linux), with the missing part though being registering for notifications (the FMX service definition lacks that I think as a concept)

from delphidarkmode.

birbilis avatar birbilis commented on July 20, 2024 1

actually, I'd expect Embarcadero to port those interfaces back into VCL so that one could evolve their VCL app gradually with such features and eventually either port it or maintain both VCL and FMX versions of their app with a large common codebase

from delphidarkmode.

birbilis avatar birbilis commented on July 20, 2024

Eventually one could contribute an implementation of IFMXSystemApperanceService for Windows, as mentioned at https://quality.embarcadero.com/browse/RSP-37290 and in comments at https://stackoverflow.com/a/67457500/903783

from delphidarkmode.

checkdigits avatar checkdigits commented on July 20, 2024

Hmm. There is an intention to refactor this as a class helper for forms. This is how I've seen things like rounded corners done and so on and I've seen Marco Cantu using this method as well.

With it refactored as a class helper it would be a little more than conditional defines but still doable. πŸ‘

I think I'll definitely add FMX support and likely combine in the rounded corners control too just for good measure.

from delphidarkmode.

checkdigits avatar checkdigits commented on July 20, 2024

Yes, but the FMX service as it stands would limit the minimum version of Delphi/C++ builder it would work with. That said it's not a bad idea to add in the missing Windows capabilities.

The trapping of the change event is relatively simple on Windows (until Microsoft change how it works!) but for other platforms it's not quite as universally supported which may be why it was avoided in the first place.

Thanks for the inspiration. I just need to invent a few extra weekdays now, so I get the time to do it all. πŸ€ͺ

from delphidarkmode.

checkdigits avatar checkdigits commented on July 20, 2024

I would be very surprised if there is not something along these lines planned. Marco CantΓΊ did a similar thing with a class helper for TForm in a recent blog post of his - that would be my suggested method since it's a more clean implementation.

from delphidarkmode.

Related Issues (1)

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.