Giter Club home page Giter Club logo

Comments (5)

setzer22 avatar setzer22 commented on July 23, 2024 1

This is pretty nice! Thanks for taking the time

Personally I like the colors, it feels like it has enough contrast and is similar to the original theme. Could you submit this as a pull request? 😄

change the color of connections for each data type

This can be implemented in several ways. I think the most flexible option is to pass an immutable reference to the UserState in the data_type_color method here:

/// This trait must be implemented by the `DataType` generic parameter of the
/// [`Graph`]. This trait tells the library how to visually expose data types
/// to the user.
pub trait DataTypeTrait: PartialEq + Eq {
// The associated port color of this datatype
fn data_type_color(&self) -> egui::Color32;
// The name of this datatype
fn name(&self) -> &str;
}

This would only allow customization beyond egui's light / dark theme, for users that have other kinds of needs.

make it possible to specify the background color of title for each node template

I think it's more flexible if we make the titlebar color a property of the node itself, not its template. This allows more custom behavior in case someone needs it (like, I don't know, a color picker node having the same color in the titlebar 🤔. This would be possible by adding a titlebar_color method here:

/// This trait must be implemented for the `NodeData` generic parameter of the
/// [`Graph`]. This trait allows customizing some aspects of the node drawing.
pub trait NodeDataTrait
where
Self: Sized,
{

Is this something you'd enjoy working on? I can take a look at it, but since you're already halfway there with the color changes I think it'd make sense if you want to tackle it :)

from egui_node_graph.

setzer22 avatar setzer22 commented on July 23, 2024 1

Nice! 😄 Looking forward to it

from egui_node_graph.

setzer22 avatar setzer22 commented on July 23, 2024 1

With your latest changes, I think we can now close this. Thanks again! 🎉

from egui_node_graph.

kkngsm avatar kkngsm commented on July 23, 2024

I would like to suggest other color-related functions.

  • change the color of connections for each data type.
  • make it possible to specify the background color of title for each node template.

from egui_node_graph.

kkngsm avatar kkngsm commented on July 23, 2024

make it possible to specify the background color of title for each node template

I think it's more flexible if we make the titlebar color a property of the node itself, not its template.

Indeed, your idea is great.
I am implementing this now.

from egui_node_graph.

Related Issues (20)

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.