Comments (13)
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.
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.
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.
I would prefer [f32, ..4]
whenever possible. We could change stuff in color.rs and declare static named colors.
from conrod.
Yeah I like this idea :-) maybe open an issue for it?
from conrod.
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.
I think the border should be there for editing.
from conrod.
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.
Maybe "margin" is a better name?
pub enum UseMargin {
Margin(0f64, Coloring).
NoMargin,
}
from conrod.
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.
I think "margin" is more familiar to people, coming from CSS.
from conrod.
As discussed on IRC, Frame
-> Framing
is better than Margin
-> Margining
.
from conrod.
Implemented in #68
from conrod.
Related Issues (20)
- Saving off the glyph_cache and texture_cache for caching text on GPU HOT 1
- Build failure in `conrod_vulkano` discovered on rasberry pi. HOT 2
- SDL2 backend? HOT 1
- Building on Apple M1 (update `winit`)
- [Bug] Could not compile `conrod_glium` HOT 1
- Tutorial is outdated
- List with multiple widgets as items.
- Inconsistent behaviour of TextEdit and TextBox widgets under conrod_piston vs. other backends
- Dynamic size from window HOT 1
- Need help figuring out failure in android with conrod_wgpu HOT 7
- [Question] Scollable kid canvas
- conrod_glium::Renderer::new(&display) doesn't compile anymore HOT 1
- Doesn't Compile HOT 1
- Scrissor rect should be clamped
- Questions regarding this project
- Is it possible to use conrod in retained mode?
- Is the source code of "JAW - Jen Audio Workstation" published?
- Add `#[must_use]` to widgets
- Is the project still alive? HOT 3
- Stepping away from conrod (alternative GUI recommendations + opening for maintainers within) HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from conrod.