Remove generic Color in widgets

This commit is contained in:
Héctor Ramón Jiménez 2019-09-19 18:47:01 +02:00
parent f9de39ddaa
commit b83a4b42dd
12 changed files with 83 additions and 120 deletions

View file

@ -2,8 +2,6 @@ use super::{into_color, Renderer};
use ggez::graphics::{DrawMode, MeshBuilder, Rect};
impl iced::renderer::Debugger for Renderer<'_> {
type Color = iced::Color;
fn explain(&mut self, layout: &iced::Layout<'_>, color: iced::Color) {
let bounds = layout.bounds();

View file

@ -5,7 +5,7 @@ use iced::text;
use std::cell::RefCell;
use std::f32;
impl text::Renderer<iced::Color> for Renderer<'_> {
impl text::Renderer for Renderer<'_> {
fn node(
&self,
style: iced::Style,

View file

@ -1,10 +1,9 @@
use super::Renderer;
pub use iced::{button, slider, text, Align, Button, Color, Slider};
pub use iced::{
button, slider, text, Align, Button, Checkbox, Color, Radio, Slider, Text,
};
pub type Text = iced::Text<Color>;
pub type Checkbox<Message> = iced::Checkbox<Color, Message>;
pub type Radio<Message> = iced::Radio<Color, Message>;
pub type Image<'a> = iced::Image<&'a str>;
pub type Column<'a, Message> = iced::Column<'a, Message, Renderer<'a>>;