mirror of
https://github.com/emilk/egui.git
synced 2026-09-02 06:40:06 -04:00
Make FontId functions constant (#1463)
This commit is contained in:
@@ -36,17 +36,17 @@ impl Default for FontId {
|
|||||||
|
|
||||||
impl FontId {
|
impl FontId {
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn new(size: f32, family: FontFamily) -> Self {
|
pub const fn new(size: f32, family: FontFamily) -> Self {
|
||||||
Self { size, family }
|
Self { size, family }
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn proportional(size: f32) -> Self {
|
pub const fn proportional(size: f32) -> Self {
|
||||||
Self::new(size, FontFamily::Proportional)
|
Self::new(size, FontFamily::Proportional)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn monospace(size: f32) -> Self {
|
pub const fn monospace(size: f32) -> Self {
|
||||||
Self::new(size, FontFamily::Monospace)
|
Self::new(size, FontFamily::Monospace)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user