add password field

This commit is contained in:
2026-11-01 17:26:30 +07:00
parent b2ce60f0e6
commit acf907461b
9 changed files with 430 additions and 56 deletions
+5 -6
View File
@@ -292,11 +292,7 @@ pub struct SizeTable {
}
impl SizeTable {
/// Every metric derives from the root font size; components fetch, and
/// never scale these themselves.
pub fn with_root_font_size(rem_size: Pixels) -> Self {
// One row per size class: control height, padding, label text, icon,
// avatar, strip band, and plate inset — all as root-size multiples.
struct ClassFactors {
height: f32,
padding: f32,
@@ -306,6 +302,7 @@ impl SizeTable {
strip: f32,
inset: f32,
}
let small = ClassFactors {
height: 1.5,
padding: 0.75,
@@ -315,6 +312,7 @@ impl SizeTable {
strip: 1.5,
inset: 0.125,
};
let medium = ClassFactors {
height: 1.75,
padding: 1.0,
@@ -324,6 +322,7 @@ impl SizeTable {
strip: 2.0,
inset: 0.25,
};
let large = ClassFactors {
height: 2.25,
padding: 1.25,
@@ -333,6 +332,7 @@ impl SizeTable {
strip: 3.0,
inset: 0.375,
};
let metrics = |f: &ClassFactors| ControlMetrics {
control_height: rem_size * f.height,
input_height: rem_size * (f.height + 0.125),
@@ -353,8 +353,7 @@ impl SizeTable {
medium: metrics(&medium),
large: metrics(&large),
};
// Dense text stops growing with the large class, and small's is
// one step below its label.
table.small.caption_size = table.small.text_size * 0.85;
table.large.caption_size = table.medium.text_size;
table