Skip to content

v2.0.0

Latest
Compare
Choose a tag to compare
@edfloreshz edfloreshz released this 10 Jan 00:00
· 1 commit to main since this release

We’re thrilled to announce the release of version 2.0.0! 🚀

After much hard work, testing, and listening to your feedback, this update brings exciting changes to the API, performance improvements, and a much needed addition, error management! We hope that this release fixes the issues that prevented many libraries from using this crate.

Important

Earlier this year, I proposed a feature for this library that would notify users when the theme changes. After several iterations, we developed a polished implementation specifically for FreeDesktop systems. Unfortunately, providing this functionality on other platforms proved challenging due platform specific limitations. After careful consideration, we decided not to pursue support for this feature. Instead, we are encouraging window creation libraries to take on this responsibility, ensuring a more seamless experience.

Breaking changes

This version brings breaking changes, the most important one being that dark_light::detect() now returns Result<Mode, Error>:

pub fn detect() -> Result<Mode, Error>;

dark-light is now capable of reporting issues during the attempt to detect the current Mode.

pub enum Error {
    /// If an I/O error occurs.
    Io(std::io::Error),
    /// If the XDG Desktop Portal could not be communicated with.
    XdgDesktopPortal(String),
    /// If the timeout is reached.
    Timeout,
    /// Failed to get persistent domain for Apple Global Domain.
    PersistentDomainFailed,
    /// If the window could not be found.
    WindowNotFound,
    /// If the media query could not be executed.
    MediaQueryFailed,
    /// If the media query is not supported.
    MediaQueryNotSupported,
}

We've also managed to close all issues, with only one remaining feature, maybe in our next release.

What's Changed

New Contributors

Full Changelog: 1.1.1...2.0.0