forked from reya/gpui-native-kit
add sizable trait
This commit is contained in:
@@ -20,6 +20,10 @@ use crate::system::{AccessibilityPreferences, PartialPalette, SourceKind, System
|
||||
|
||||
/// Default control radius for macOS controls.
|
||||
const CONTROL_RADIUS_PTS: f32 = 6.0;
|
||||
/// The rounded-bezel text field's intrinsic height at regular size.
|
||||
const INPUT_HEIGHT_PTS: f32 = 24.0;
|
||||
/// The HIG's default body text on macOS is 13 pt (system font size 13 at 1x).
|
||||
const ROOT_FONT_SIZE_PTS: f32 = 13.0;
|
||||
|
||||
#[derive(Default)]
|
||||
pub(crate) struct MacosSource {
|
||||
@@ -102,6 +106,8 @@ impl ThemeSource for MacosSource {
|
||||
accent: Self::color_to_hsla(&NSColor::controlAccentColor()),
|
||||
palette,
|
||||
control_radius: Some(gpui::px(CONTROL_RADIUS_PTS)),
|
||||
input_height: Some(gpui::px(INPUT_HEIGHT_PTS)),
|
||||
root_font_size: Some(gpui::px(ROOT_FONT_SIZE_PTS)),
|
||||
accessibility,
|
||||
source: SourceKind::Macos,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user