mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-16 23:24:24 +00:00
fmt
This commit is contained in:
@@ -379,20 +379,10 @@ impl Rows<'_> {
|
||||
}
|
||||
});
|
||||
let sides = MIN_PAGE_SIDE..=MAX_PAGE_SIDE;
|
||||
let width = Length {
|
||||
key: "width",
|
||||
label: words.width.clone(),
|
||||
get: |s| s.width,
|
||||
set: |s, v| s.set_size(v, s.height),
|
||||
range: sides.clone(),
|
||||
};
|
||||
let height = Length {
|
||||
key: "height",
|
||||
label: words.height.clone(),
|
||||
get: |s| s.height,
|
||||
set: |s, v| s.set_size(s.width, v),
|
||||
range: sides,
|
||||
};
|
||||
let width =
|
||||
Length { key: "width", label: words.width.clone(), get: |s| s.width, set: |s, v| s.set_size(v, s.height), range: sides.clone() };
|
||||
let height =
|
||||
Length { key: "height", label: words.height.clone(), get: |s| s.height, set: |s, v| s.set_size(s.width, v), range: sides };
|
||||
let wide = self.length(ui, form, setup, width);
|
||||
self.length(ui, form, setup, height) && wide
|
||||
})
|
||||
|
||||
@@ -109,7 +109,16 @@ impl TabStopsDialog {
|
||||
pub fn new(mut stops: Vec<TabStop>, default_interval: f32) -> Self {
|
||||
stops.retain(|stop| stop.position.is_finite());
|
||||
stops.truncate(MAX_STOPS);
|
||||
TabStopsDialog { stops, cleared: Vec::new(), default_interval, selected: None, edited: None, unit: DocUnit::default(), draft: None, to_edit: false }
|
||||
TabStopsDialog {
|
||||
stops,
|
||||
cleared: Vec::new(),
|
||||
default_interval,
|
||||
selected: None,
|
||||
edited: None,
|
||||
unit: DocUnit::default(),
|
||||
draft: None,
|
||||
to_edit: false,
|
||||
}
|
||||
}
|
||||
|
||||
/// Sets the unit the position fields show.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
//! `PasswordDialog`: the password for a protected file, a permissions password, or a new password with its strength.
|
||||
|
||||
use crate::buttons::ToggleButton;
|
||||
use crate::contract::{Bind, NoValue, Outcome, Props as _, clicked, Remember as _, Show as _, ShowContainer as _};
|
||||
use crate::contract::{Bind, NoValue, Outcome, Props as _, Remember as _, Show as _, ShowContainer as _, clicked};
|
||||
use crate::dialog::{Dialog, DialogOutput};
|
||||
use crate::display::{Icon, Progress, Text};
|
||||
use crate::form::{Field, FieldGroup, Help};
|
||||
|
||||
Reference in New Issue
Block a user