Comments (3)
Yes, although I'm still planning the architecture of how will it be done, like should it be something similar to CSS (albeit with the bad and confusing parts due to backward-compatibility replaced), and how to apply it to native widgets consistently on all platforms. But it's coming soon:tm:.
from capy.
(Sorry for replying to an old issue) but what about something like DataWrapper but StyleWrapper?
const importantButton = capy.StyleWrapper(
.{
.backgroundColor = capy.rgb(255, 0, 0)
}
)
and then for creating a button let's say
.button(.{.label = "DELETE YOUR ENTIRE OS"}).style(importantButton)
(maybe not limit buttons to only one style?. styles added first have less priority)
and if you do something like importantButton.backgroundColor.blue = 255
will update every component using the style. or even let styles use DataWrappers, but maybe that's too complex
This is just an idea I had and I don't know how cross platform would that be. However I think it's better than something like CSS because you don't have to parse and that would help linters (?)
from capy.
@zenith391 it should be possible to style a button using a bitmap for pretty much any conceivable UI kit, although it may have performance implications.
Maybe the theme engine could support basic drawing like lines, fill, alignment and gradients, then anything that somehow doesn't support drawing them on the fly could fall back on a pre-rendered bitmap? If this route is chosen, then a TinyVG (Zig-native vector image) Kvantum-like theme format could be used.
from capy.
Related Issues (20)
- Implement Material 3 for Android
- Failed to run `zig build run` with zig-template in Linux HOT 1
- Button callback not invoked HOT 2
- Need an example on how to use Capy as a package. HOT 4
- Broken on newer zig versions (not sure since when) HOT 1
- Broken on zig 0.12.0 as well as 0.11.0 HOT 1
- Accessibility: Missing keyboard navigability and focus HOT 2
- Zig tracking issue
- GTK window is not re-rendering HOT 1
- C API HOT 2
- errenous masking of windows message flags
- Android minimal example build fails
- AudioGenerator code prevents compiling if target isn't wasm. HOT 2
- Fails to build on linux HOT 4
- zig version 0.12.0-dev.2159+7916cf6f8 build changes HOT 1
- Zig master compile error HOT 1
- Missing dropdown menus
- Compiler Error HOT 2
- MacOS platform support? HOT 2
- In window capy example template throw error HOT 1
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 capy.