1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-30 21:30:03 -04:00

Enable colored text (and other misc fixes)

This commit is contained in:
Emil Ernerfeldt
2019-01-16 09:28:43 -06:00
parent 4dab7a1504
commit 7f83876005
9 changed files with 104 additions and 82 deletions

View File

@@ -129,8 +129,6 @@ fn translate_cmd(out_commands: &mut Vec<PaintCmd>, style: &Style, cmd: GuiCmd) {
rect: interact.rect,
});
// TODO: paint a little triangle or arrow or something instead of this
let (small_icon_rect, _) = style.icon_rectangles(&interact.rect);
// Draw a minus:
out_commands.push(PaintCmd::Line {
@@ -215,12 +213,13 @@ fn translate_cmd(out_commands: &mut Vec<PaintCmd>, style: &Style, cmd: GuiCmd) {
}
}
GuiCmd::Text {
color,
pos,
text_style,
text,
text_style,
x_offsets,
} => {
let color = style.text_color();
let color = color.unwrap_or_else(|| style.text_color());
out_commands.push(PaintCmd::Text {
color,
text_style,
@@ -237,7 +236,7 @@ fn translate_cmd(out_commands: &mut Vec<PaintCmd>, style: &Style, cmd: GuiCmd) {
color: srgba(255, 255, 255, 255), // TODO
width: 1.0,
}),
rect: rect,
rect,
});
}
}