GithubHelp home page GithubHelp logo

iced-milligram's Introduction

iced-milligram

A port of a css framework milligram to iced.

[dependencies]
iced-milligram = { git = "https://github.com/elbaro/iced-milligram", branch = "main" }
let ugly_button = iced::Button::new(iced::Text::new("text"));
let milligram_button = iced_milligram::widget::button("text");

This crate does not pixel-perfect replicate the original css framework. The original milligram theme is adjusted in several ways:

  1. The original button has a letter-spacing. iced does not support the letter-spacing. Instead a little larger font-size is used.
  2. The button color for mouse hover is adjusted. While iced::button::StyleSheet can specify a different color for mouse hover, we cannot change the color of the button's children (i.e. the text label).
  3. The original paddings / margins are approximated.

Guide

iced_milligram::style has StyleSheet types and color/size constants. iced_milligram::widget has constructor functions for common use cases.

use iced_milligram::widget as milligram;
let button = milligram::large_outlined_button(&mut state, "Button Label").on_press(..);
let text_input = milligram::text_input(..);

License

iced-milligram's People

Contributors

elbaro avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

happydpc

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.