working bar context menus + kbd downsize

This commit is contained in:
galister
2026-01-07 19:03:47 +09:00
parent 165070da51
commit ac9f3c6d23
12 changed files with 237 additions and 142 deletions

View File

@@ -16,7 +16,7 @@ use crate::drawing::{self};
pub static SWASH_CACHE: LazyLock<Mutex<SwashCache>> = LazyLock::new(|| Mutex::new(SwashCache::new()));
/// Used in case no `font_size` is defined
const DEFAULT_FONT_SIZE: f32 = 14.;
pub(crate) const DEFAULT_FONT_SIZE: f32 = 14.;
/// In case no `line_height` is defined, use `font_size` * `DEFAULT_LINE_HEIGHT_RATIO`
const DEFAULT_LINE_HEIGHT_RATIO: f32 = 1.43;
@@ -77,7 +77,11 @@ impl From<&TextStyle> for Metrics {
impl From<&TextStyle> for Wrap {
fn from(value: &TextStyle) -> Self {
if value.wrap { Self::WordOrGlyph } else { Self::None }
if value.wrap {
Self::WordOrGlyph
} else {
Self::None
}
}
}