make clippy happy
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
use crate::NotedeckTextStyle;
|
||||
|
||||
pub const NARROW_SCREEN_WIDTH: f32 = 550.0;
|
||||
/// Determine if the screen is narrow. This is useful for detecting mobile
|
||||
/// contexts, but with the nuance that we may also have a wide android tablet.
|
||||
|
||||
pub fn richtext_small<S>(text: S) -> egui::RichText
|
||||
where
|
||||
@@ -11,6 +9,8 @@ where
|
||||
egui::RichText::new(text).text_style(NotedeckTextStyle::Small.text_style())
|
||||
}
|
||||
|
||||
/// Determine if the screen is narrow. This is useful for detecting mobile
|
||||
/// contexts, but with the nuance that we may also have a wide android tablet.
|
||||
pub fn is_narrow(ctx: &egui::Context) -> bool {
|
||||
let screen_size = ctx.input(|c| c.screen_rect().size());
|
||||
screen_size.x < NARROW_SCREEN_WIDTH
|
||||
|
||||
Reference in New Issue
Block a user