Giter Club home page Giter Club logo

Comments (13)

mitchmindtree avatar mitchmindtree commented on July 20, 2024

Yeah I was pondering something similar to this, I like this idea :-) perhaps instead of just passing in a Color, we could pass in an enum

pub enum Coloring {
    UseColor(f32, f32, f32),
    Reactive(Color), // Will create an "inverted" Color from a given background Color so it stands out
    Default, // A default Color will be used
}

from conrod.

bvssvni avatar bvssvni commented on July 20, 2024

Or something like this:

pub enum Coloring {
    UseColor([f32, ..4]),
    Reactive([f32, ..4]), // Will create an "inverted" Color from a given background Color so it stands out
    DefaultFromTheme(Theme), // A default Color will be used from theme
}

from conrod.

mitchmindtree avatar mitchmindtree commented on July 20, 2024

Do you think we should use the Color struct (defined in color.rs) or slices instead? We could probably change over most of the stuff in the color.rs module to work with slices if it's preferred?

from conrod.

bvssvni avatar bvssvni commented on July 20, 2024

I would prefer [f32, ..4] whenever possible. We could change stuff in color.rs and declare static named colors.

from conrod.

mitchmindtree avatar mitchmindtree commented on July 20, 2024

Yeah I like this idea :-) maybe open an issue for it?

from conrod.

mitchmindtree avatar mitchmindtree commented on July 20, 2024

Oh also, in regards to the black frame - You can get rid of it by passing 0f64 into the border argument (the number of pixels wide the frame should be) for whatever the widget is. Maybe try changing it in the example and see how you like it?

from conrod.

bvssvni avatar bvssvni commented on July 20, 2024

I think the border should be there for editing.

from conrod.

mitchmindtree avatar mitchmindtree commented on July 20, 2024

Perhaps rather than just passing a f64 for the pixel size, we pass a

pub enum UseBorder {
    Border(f64, [f32, ..4]).
    NoBorder,
}

So that user can specify color and width if they wish

from conrod.

bvssvni avatar bvssvni commented on July 20, 2024

Maybe "margin" is a better name?

pub enum UseMargin {
    Margin(0f64, Coloring).
    NoMargin,
}

from conrod.

mitchmindtree avatar mitchmindtree commented on July 20, 2024

How about "frame"? As it's kind of like a picture frame, and is also 1 less character haha.

pub enum UseFrame {
    Frame(0f64, Coloring),
    NoFrame,
}

from conrod.

bvssvni avatar bvssvni commented on July 20, 2024

I think "margin" is more familiar to people, coming from CSS.

from conrod.

bvssvni avatar bvssvni commented on July 20, 2024

As discussed on IRC, Frame -> Framing is better than Margin -> Margining.

from conrod.

mitchmindtree avatar mitchmindtree commented on July 20, 2024

Implemented in #68

from conrod.

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.