1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-02 23:00:04 -04:00

Improve docs concerning custom fonts, themes and accessibility

Closes https://github.com/emilk/egui/pull/370
Closes https://github.com/emilk/egui/issues/372
This commit is contained in:
Emil Ernerfeldt
2021-05-11 14:56:27 +02:00
parent 8f8ba16696
commit 7b0f991b20
11 changed files with 127 additions and 16 deletions

View File

@@ -88,8 +88,9 @@ impl View for MiscDemoWindow {
ui.horizontal(|ui| {
ui.label("You can pretty easily paint your own small icons:");
use std::f32::consts::TAU;
let (rect, _response) = ui.allocate_at_least(Vec2::splat(16.0), Sense::hover());
let painter = ui.painter();
let size = Vec2::splat(16.0);
let (response, painter) = ui.allocate_painter(size, Sense::hover());
let rect = response.rect;
let c = rect.center();
let r = rect.width() / 2.0 - 1.0;
let color = Color32::from_gray(128);