GithubHelp home page GithubHelp logo

catppuccin / egui Goto Github PK

View Code? Open in Web Editor NEW
188.0 3.0 18.0 386 KB

πŸ“ Soothing pastel theme for egui

Home Page: https://docs.rs/catppuccin-egui

License: MIT License

Rust 92.50% Nix 7.50%
catppuccin egui theme hacktoberfest

egui's Introduction

Logo
Catppuccin for egui

Previews

🌻 Latte
πŸͺ΄ FrappΓ©
🌺 Macchiato
🌿 Mocha

Usage

catppuccin-egui uses Cargo features to add support for new egui versions without breaking backwards compatibility.

Add the crate to your Cargo.toml:

[dependencies]
catppuccin-egui = { version = "5.1", default-features = false, features = ["egui27"] }

To use a theme, call the set_theme function with a theme and the egui context:

catppuccin_egui::set_theme(&ctx, catppuccin_egui::MOCHA);

To run the example app, run cargo run --example todo.

See the full documentation at https://docs.rs/catppuccin-egui.

Whiskers is required as a build-time development dependency.

πŸ’ Thanks to

Β 

Copyright Β© 2023-present Catppuccin Org

egui's People

Contributors

dependabot[bot] avatar dkolter avatar github-actions[bot] avatar grantshandy avatar jdenozi avatar lampsitter avatar mcofficer avatar stonks3141 avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

egui's Issues

Zoom Issues

Zoom Issue because of setting ctx.set_pixels_per_point(1.25);

my app switches between 2.0 and 1.25

Improvements

Hi, can you please add build instructions:

cargo run --example todo // saves a beginner 15 minutes

Ubuntu:

thread 'main' panicked at build.rs:14:10:
called Result::unwrap() on an Err value: Os { code: 2, kind: NotFound, message: "No such file or directory" }

Repo naming

Cloning this repo leads to naming conflicts if you already have egui repo cloned.

Wrong button color?

Hi, I tried the todo example with the "LATTE" theme and noticed that the contrast of text color on the buttons is bad. The colors also do not match the screenshots on the readme, so I suppose it's a bug?
image

selection of egui version via cargo features

Hi there,

i think this repository has exposed types of egui and needs to be in sync with egui releases of the used rust project. Nevertheless, i found similar crates suffering of the same dependency management problem, like the create egui_struct. I have seen there, that they found a quite elegant solution in my eyes, where they expose the egui dependency selection via cargo features:

See here:
https://github.com/PingPongun/egui_struct/blob/master/Cargo.toml

Maybe the same approach is good applicable here?

best,
Christian

Egui windows have large shadows when using Catppuccin themes

I'm using bevy along with bevy_egui and the git version of Catppuccin egui. When catpuccin themes are applied, floating windows have a large shadow applied to them.

Using set_theme

fn gui(mut contexts: EguiContexts) {
    catppuccin_egui::set_theme(contexts.ctx(), catppuccin_egui::LATTE);
    egui::Window::new("Noise").show(contexts.ctx_mut(), |ui| { /* UI code */ });
    egui::SidePanel::left("Noise").show(contexts.ctx_mut(), |ui| { /* UI code */ });
}

image

Using set_style_theme

fn gui(mut contexts: EguiContexts) {
    let mut style = (*contexts.ctx_mut().style()).clone();
    catppuccin_egui::set_style_theme(&mut style, catppuccin_egui::LATTE);
    contexts.ctx_mut().set_style(style);
    egui::Window::new("Noise").show(contexts.ctx_mut(), |ui| { /* UI code */ });
    egui::SidePanel::left("Noise").show(contexts.ctx_mut(), |ui| { /* UI code */ });
}

image

Using default theme

fn gui(mut contexts: EguiContexts) {
    contexts.ctx_mut().style_mut(|style| {
        style.visuals = Visuals::light();
    });
    egui::Window::new("Noise").show(contexts.ctx_mut(), |ui| { /* UI code */ });
    egui::SidePanel::left("Noise").show(contexts.ctx_mut(), |ui| { /* UI code */ });
}

image

Scaling

On my PC (2560x1440) the scaling is great. On Macbook Air (retina display) and Ubuntu on Thinkpad (2440x1920?) the fonts and check boxes are all far too small. To fix, todo.rs line 105 needs adjusting:

ctx.set_pixels_per_point(1.25);

Can this be adjusted automatically?

Wow

Wow, very nicely done ! Colors and font look great.

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.