mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-26 00:57:26 +00:00
Merge remote-tracking branch 'origin/next' into fix/vc-highlights-a
This commit is contained in:
@@ -548,8 +548,12 @@ const MAX_XATTR_TOTAL_BYTES: usize = 64 * 1024 * 1024;
|
||||
/// binding, quarantine, resource forks) to the stage. The attributes are as untrusted as the
|
||||
/// bytes, so the reads are bounded; one that cannot be read or written whole, or passes a bound,
|
||||
/// refuses the save rather than dropping the user's metadata unnoticed. Only a volume without
|
||||
/// extended attributes (`ENOTSUP`) is skipped. `com.apple.provenance` belongs to macOS, which
|
||||
/// gives the new file its own. Compression bookkeeping stays hidden (no `XATTR_SHOWCOMPRESSION`).
|
||||
/// extended attributes (`ENOTSUP`) is skipped. So is a file whose data the user may not read when
|
||||
/// its attribute names can't be listed either, as with mode 0200: its attributes are dropped, as
|
||||
/// before attributes were kept, since the user can't read them (or its bytes) at all. One whose
|
||||
/// data is denied but whose names can be listed (an ACL that denies reading) refuses the save.
|
||||
/// `com.apple.provenance` belongs to macOS, which gives the new file its own. Compression
|
||||
/// bookkeeping stays hidden (no `XATTR_SHOWCOMPRESSION`).
|
||||
#[cfg(target_os = "macos")]
|
||||
fn copy_xattrs(target: &Path, stage: &File) -> io::Result<()> {
|
||||
use rustix::fs::{Mode, OFlags, XattrFlags, fgetxattr, fgetxattr_query, flistxattr, fsetxattr, open};
|
||||
@@ -560,6 +564,7 @@ fn copy_xattrs(target: &Path, stage: &File) -> io::Result<()> {
|
||||
let source = match open(target, OFlags::RDONLY | OFlags::CLOEXEC | OFlags::NOFOLLOW | OFlags::NONBLOCK, Mode::empty()) {
|
||||
Ok(fd) => File::from(fd),
|
||||
Err(Errno::NOENT | Errno::LOOP) => return Ok(()),
|
||||
Err(Errno::ACCESS) => return unreadable_has_no_attributes(target),
|
||||
Err(e) => return Err(e.into()),
|
||||
};
|
||||
if !source.metadata()?.is_file() {
|
||||
@@ -595,6 +600,27 @@ fn copy_xattrs(target: &Path, stage: &File) -> io::Result<()> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// For a target whose data can't be opened for reading: `Ok` when the user can list no extended
|
||||
/// attribute names on it (none, only `com.apple.provenance`, none supported, or listing is denied too,
|
||||
/// as for mode 0200, whose attributes are then dropped); otherwise refuse the save, as the attributes
|
||||
/// can't be copied without opening the file. The names are read without following a link, by path.
|
||||
#[cfg(target_os = "macos")]
|
||||
fn unreadable_has_no_attributes(target: &Path) -> io::Result<()> {
|
||||
use rustix::fs::llistxattr;
|
||||
use rustix::io::Errno;
|
||||
let mut names = vec![0u8; MAX_XATTR_NAMES_BYTES];
|
||||
match llistxattr(target, names.as_mut_slice()) {
|
||||
Ok(0) | Err(Errno::NOTSUP | Errno::ACCESS | Errno::NOENT) => Ok(()),
|
||||
Ok(len) if names.get(..len).is_some_and(|names| names.split(|b| *b == 0).all(|name| name.is_empty() || name == b"com.apple.provenance")) => {
|
||||
Ok(())
|
||||
}
|
||||
Ok(_) | Err(Errno::RANGE) => {
|
||||
Err(io::Error::new(io::ErrorKind::PermissionDenied, "the file can't be read, so its extended attributes can't be copied"))
|
||||
}
|
||||
Err(e) => Err(e.into()),
|
||||
}
|
||||
}
|
||||
|
||||
/// Read one attribute value of `size` bytes (already within the bounds) with `read`, then ask
|
||||
/// its size again with `query_size`. A read that does not fill `size`, or a size that changed,
|
||||
/// is refused: a growing resource fork returns the prefix that fits instead of an error.
|
||||
|
||||
@@ -99,3 +99,49 @@ fn private_staging_preserves_existing_modes_after_callback() -> io::Result<()> {
|
||||
assert_no_temp(&d.0);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Extended attribute names on `path`, read by path.
|
||||
#[cfg(target_os = "macos")]
|
||||
fn xattr_names(path: &Path) -> Vec<Vec<u8>> {
|
||||
let mut names = vec![0u8; 64 * 1024];
|
||||
let len = rustix::fs::listxattr(path, names.as_mut_slice()).unwrap_or(0);
|
||||
names.truncate(len);
|
||||
names.split(|b| *b == 0).filter(|n| !n.is_empty()).map(<[u8]>::to_vec).collect()
|
||||
}
|
||||
|
||||
/// A write-only file (mode 0200) saves: macOS lets its owner neither read its data nor list its
|
||||
/// attributes, so its attributes are dropped, as before attributes were kept.
|
||||
#[cfg(target_os = "macos")]
|
||||
#[test]
|
||||
fn a_write_only_file_saves_and_drops_the_attributes_it_cannot_read() -> io::Result<()> {
|
||||
use std::os::unix::fs::PermissionsExt;
|
||||
let d = TempDir::new("write_only_xattrs");
|
||||
let p = d.0.join("doc.craft");
|
||||
std::fs::write(&p, ORIGINAL)?;
|
||||
rustix::fs::setxattr(&p, "com.craft.t", b"tag", rustix::fs::XattrFlags::empty())?;
|
||||
std::fs::set_permissions(&p, std::fs::Permissions::from_mode(0o200))?;
|
||||
atomic_write(&p, b"new")?;
|
||||
std::fs::set_permissions(&p, std::fs::Permissions::from_mode(0o600))?;
|
||||
assert_eq!(std::fs::read(&p)?, b"new");
|
||||
assert!(!xattr_names(&p).iter().any(|n| n == b"com.craft.t"), "the unreadable attribute is dropped");
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// A file whose data an ACL denies but whose attribute names can be listed is not replaced: its
|
||||
/// attributes can't be copied without its data, and the save refuses rather than drop them.
|
||||
#[cfg(target_os = "macos")]
|
||||
#[test]
|
||||
fn an_unreadable_file_with_listable_attributes_is_not_replaced() -> io::Result<()> {
|
||||
let d = TempDir::new("acl_denied_xattrs");
|
||||
let p = d.0.join("doc.craft");
|
||||
std::fs::write(&p, ORIGINAL)?;
|
||||
rustix::fs::setxattr(&p, "com.craft.t", b"tag", rustix::fs::XattrFlags::empty())?;
|
||||
let denied = std::process::Command::new("/bin/chmod").arg("+a").arg("everyone deny read").arg(&p).status()?;
|
||||
assert!(denied.success(), "the ACL is set");
|
||||
let result = atomic_write(&p, b"new");
|
||||
let _ = std::process::Command::new("/bin/chmod").arg("-N").arg(&p).status();
|
||||
assert!(result.is_err(), "the save is refused");
|
||||
assert_eq!(std::fs::read(&p)?, ORIGINAL, "the original is unchanged");
|
||||
assert!(xattr_names(&p).iter().any(|n| n == b"com.craft.t"), "and keeps its attribute");
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@@ -783,7 +783,7 @@ impl Component for PaintChip<'_> {
|
||||
}
|
||||
|
||||
fn paint(&mut self, ui: &mut PaintUi<'_>, cx: &Cx<'_, Self>) {
|
||||
let (well, mark) = self.layout(cx.rect, &cx.style, cx.flow.is_rtl());
|
||||
let (well, mark) = self.layout(cx.rect, cx.style, cx.flow.is_rtl());
|
||||
if self.popup_mark == PopupMark::Menu {
|
||||
let mut arrow = DisclosureGlyph::dropdown_of(cx.env.get());
|
||||
arrow.color = Some(cx.style.arrow_color);
|
||||
|
||||
@@ -389,11 +389,10 @@ fn read_system() -> Region {
|
||||
Region::from_tag(&sys_locale::get_locale().unwrap_or_default())
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
#[cfg(all(test, unix, not(any(target_vendor = "apple", target_os = "android"))))]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
#[cfg(all(unix, not(any(target_vendor = "apple", target_os = "android"))))]
|
||||
#[test]
|
||||
fn each_locale_category_decides_its_own_part_and_lc_all_all_of_them() {
|
||||
let env =
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
//! The in-window bar's own rules over the model.
|
||||
|
||||
use craft_host::target::Os;
|
||||
use craft_menu::{Item, Menu, MenuBar, MenuBarUi, Node};
|
||||
use craft_ui::contract::Tracked;
|
||||
use craft_ui::testing::{Fixture, trial};
|
||||
@@ -18,6 +19,8 @@ fn a_disabled_submenu_is_greyed_and_does_not_open() {
|
||||
let mut fixture = Fixture::new(move |ui| {
|
||||
MenuBarUi::new(&bar).show(ui);
|
||||
});
|
||||
// The in-window bar's rules; a Mac's menus are in the system bar.
|
||||
fixture.os(Os::Linux);
|
||||
fixture.settle();
|
||||
let Some(file) = fixture.by_label("File") else { panic!("the bar shows File") };
|
||||
fixture.click(&file).settle();
|
||||
|
||||
@@ -1544,7 +1544,8 @@ impl KeyMoves {
|
||||
/// Page Up and Down a screen less a key line (a row when not continuous, and with Cmd), Home and End the first
|
||||
/// and last page, Up and Down a key line (not continuous, a turn once the row is at its edge that way), Left and
|
||||
/// Right a key line sideways while the current page or spread has more to show that way, else a turn of a page or
|
||||
/// spread; Cmd with Left or Right turns at once. Home and End with Shift or Cmd, and Page Up, Page Down, Up and
|
||||
/// spread; Cmd with Left or Right turns at once. Home and End with Shift, or with Cmd off macOS (which gives Cmd
|
||||
/// with them no move), and Page Up, Page Down, Up and
|
||||
/// Down with Shift and Cmd together, go to the first or last page; Alt, and Shift alone with the other keys,
|
||||
/// leave them to nothing.
|
||||
fn of(
|
||||
|
||||
@@ -1007,12 +1007,11 @@ fn shift_and_command_with_the_page_keys_and_arrows_go_to_the_ends() {
|
||||
);
|
||||
focus_canvas(&mut fixture);
|
||||
let keys = [(Key::PageDown, both, 4), (Key::PageUp, both, 0), (Key::ArrowDown, both, 4), (Key::ArrowUp, both, 0)];
|
||||
let ends = [
|
||||
(Key::End, Modifiers::SHIFT, 4),
|
||||
(Key::Home, Modifiers::SHIFT, 0),
|
||||
(Key::End, Modifiers::COMMAND, 4),
|
||||
(Key::Home, Modifiers::COMMAND, 0),
|
||||
];
|
||||
// Off macOS Ctrl+End and Ctrl+Home go to the ends too; macOS gives Cmd with Home and End no move.
|
||||
let mut ends = vec![(Key::End, Modifiers::SHIFT, 4), (Key::Home, Modifiers::SHIFT, 0)];
|
||||
if !cfg!(target_os = "macos") {
|
||||
ends.extend([(Key::End, Modifiers::COMMAND, 4), (Key::Home, Modifiers::COMMAND, 0)]);
|
||||
}
|
||||
for (key, mods, want) in keys.into_iter().chain(ends) {
|
||||
fixture.key(key, mods);
|
||||
fixture.idle(2);
|
||||
|
||||
@@ -2,23 +2,23 @@
|
||||
//!
|
||||
//! On Windows a file created in a folder inherits the folder's access list, and folders such as
|
||||
//! a new folder at a drive root, `C:\Users\Public` or `C:\ProgramData` let every signed-in user
|
||||
//! read what is created in them. [`restrict_to_owner`] replaces the whole list with the current
|
||||
//! user and SYSTEM only, makes that user the owner, and checks the result. [`create_private_dir`]
|
||||
//! read what is created in them. `restrict_to_owner` replaces the whole list with the current
|
||||
//! user and SYSTEM only, makes that user the owner, and checks the result. `create_private_dir`
|
||||
//! does the same for a new folder whose list the files created in it inherit, so a file can be
|
||||
//! private from the moment it exists. [`read_with_sddl`] reads a file and its security descriptor
|
||||
//! private from the moment it exists. `read_with_sddl` reads a file and its security descriptor
|
||||
//! through one handle. [`foreign_access`] reads the descriptor in SDDL form, which names accounts
|
||||
//! by SID and so reads the same in every Windows language, and says why another user could have
|
||||
//! written or could read the file. They run the tools Windows ships rather than calling the
|
||||
//! security API directly, which would need `unsafe`.
|
||||
|
||||
/// Why the file whose security descriptor is `sddl` (`O:` owner and `D:` access list, in SDDL or
|
||||
/// as [`read_with_sddl`] writes it) can't be trusted as user `me`'s own: it is owned by someone else, it has no
|
||||
/// as `read_with_sddl` writes it) can't be trusted as user `me`'s own: it is owned by someone else, it has no
|
||||
/// access list (everyone may use it), or it lets an account other than `me` or SYSTEM use it.
|
||||
/// Accounts are compared by SID; `None` means it is `me`'s alone.
|
||||
///
|
||||
/// Stricter than OpenSSH's rule for private keys, which also lets Administrators in: an entry for
|
||||
/// the Administrators group would let another administrator read the token without taking the
|
||||
/// file over. [`restrict_to_owner`] never grants it, so the app's own file always passes; a file
|
||||
/// file over. `restrict_to_owner` never grants it, so the app's own file always passes; a file
|
||||
/// that inherited it from a user's folder is refused.
|
||||
pub fn foreign_access(sddl: &str, me: &str) -> Option<String> {
|
||||
let me = me.trim();
|
||||
|
||||
@@ -376,6 +376,11 @@ impl EditorMode {
|
||||
}
|
||||
}
|
||||
|
||||
/// `text` on one line: each line ending (`\r\n`, `\r` or `\n`) becomes one space.
|
||||
fn one_line(text: &str) -> String {
|
||||
text.replace("\r\n", " ").replace(['\r', '\n'], " ")
|
||||
}
|
||||
|
||||
/// What the editor did this pass.
|
||||
#[derive(Debug)]
|
||||
#[non_exhaustive]
|
||||
@@ -572,6 +577,80 @@ fn show_i_beam(cx: &mut Cx<'_, TextEditor<'_>>, phase: &PressPhase, vertical: bo
|
||||
}
|
||||
}
|
||||
|
||||
/// Applies one pass's editor steps to `edits` in order: typing, the marked text, moves, deletes, selections, the edit
|
||||
/// commands and the commands keys fired. Returns the text a Copy or Cut put on the clipboard, and whether a command
|
||||
/// asked for the character panel.
|
||||
fn apply_steps(
|
||||
edits: &mut Edits<'_>,
|
||||
steps: Vec<EditorStep<TextEditorCommand>>,
|
||||
mode: EditorMode,
|
||||
masked: bool,
|
||||
pasted: Option<&str>,
|
||||
fallback: Rect,
|
||||
) -> (Option<String>, bool) {
|
||||
let mut copied: Option<String> = None;
|
||||
let mut ending: Option<Range<usize>> = None;
|
||||
let mut character_panel = false;
|
||||
for step in steps {
|
||||
// A commit or cancel ends the session; an input method's committed text still lands.
|
||||
if (edits.done.commit || edits.done.cancel) && ending.is_none() {
|
||||
break;
|
||||
}
|
||||
let input = match step {
|
||||
EditorStep::Input(input) => input,
|
||||
EditorStep::Command(command, _) => {
|
||||
edits.command(command, &mut character_panel);
|
||||
continue;
|
||||
}
|
||||
_ => continue,
|
||||
};
|
||||
if let Some(range) = ending.take() {
|
||||
if let EditorInput::Text(text) = &input {
|
||||
edits.commit_marked(range, text);
|
||||
continue;
|
||||
}
|
||||
edits.drop_marked(range);
|
||||
}
|
||||
match input {
|
||||
EditorInput::Preedit { text, cursor, .. } => {
|
||||
let active = cursor.map(|bytes| byte_range_to_chars(&text, bytes));
|
||||
ending = edits.preedit(&text, active);
|
||||
}
|
||||
EditorInput::ImeCommit => ending = edits.session.preedit.take(),
|
||||
EditorInput::Text(text) => edits.done.changed |= edits.insert_typed(&text),
|
||||
EditorInput::Newline { .. } if edits.session.preedit.is_none() && mode.multiline() => {
|
||||
edits.done.changed |= edits.insert_text("\n", EditKind::Typed);
|
||||
}
|
||||
EditorInput::Tab if mode.takes_tab() => edits.done.changed |= edits.insert_text("\t", EditKind::Typed),
|
||||
EditorInput::Move(step, mods) => edits.motion(step, mods),
|
||||
EditorInput::Delete { forward, by, .. } => edits.done.changed |= edits.delete(forward, by),
|
||||
EditorInput::DeleteSurrounding { before, after, unit, .. } => edits.done.changed |= edits.delete_around(before, after, unit),
|
||||
EditorInput::Select { anchor, focus, .. } => {
|
||||
let lines = lines_of(&mut *edits.host, fallback);
|
||||
edits.end_composition();
|
||||
edits.selection = TextSelection { anchor: char_at(&lines, anchor), caret: char_at(&lines, focus) };
|
||||
}
|
||||
EditorInput::Edit(EditCommand::SelectAll) => edits.select_all(),
|
||||
EditorInput::Edit(EditCommand::Copy) if !masked => copied = edits.selected_text(),
|
||||
EditorInput::Edit(EditCommand::Cut) if !masked => {
|
||||
copied = edits.selected_text();
|
||||
edits.done.changed |= edits.delete_selection();
|
||||
}
|
||||
EditorInput::Edit(EditCommand::Paste) => {
|
||||
if let Some(text) = pasted {
|
||||
let text = if mode.multiline() { text.to_string() } else { one_line(text) };
|
||||
edits.done.changed |= edits.insert_text(&text, EditKind::Pasted);
|
||||
}
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
if let Some(range) = ending {
|
||||
edits.drop_marked(range);
|
||||
}
|
||||
(copied, character_panel)
|
||||
}
|
||||
|
||||
/// The clipboard's text when the pass's input asks to paste and the clipboard has it ready.
|
||||
fn pasted_text(cx: &mut Cx<'_, TextEditor<'_>>, steps: &[EditorStep<TextEditorCommand>]) -> Option<std::sync::Arc<str>> {
|
||||
if !steps.iter().any(|step| matches!(step, EditorStep::Input(EditorInput::Edit(EditCommand::Paste)))) {
|
||||
@@ -636,7 +715,6 @@ impl Component for TextEditor<'_> {
|
||||
let now = cx.now();
|
||||
let pasted = pasted_text(cx, &steps);
|
||||
let (mode, masked) = (self.mode, self.masked);
|
||||
let mut copied: Option<String> = None;
|
||||
let mut session = std::mem::take(cx.memory::<Session>());
|
||||
let mut edits = Edits {
|
||||
host: &mut *self.host,
|
||||
@@ -652,64 +730,7 @@ impl Component for TextEditor<'_> {
|
||||
edits.reconcile();
|
||||
let fallback = space.doc_rect(cx.rect);
|
||||
|
||||
let mut ending: Option<Range<usize>> = None;
|
||||
let mut character_panel = false;
|
||||
for step in steps {
|
||||
// A commit or cancel ends the session; an input method's committed text still lands.
|
||||
if (edits.done.commit || edits.done.cancel) && ending.is_none() {
|
||||
break;
|
||||
}
|
||||
let input = match step {
|
||||
EditorStep::Input(input) => input,
|
||||
EditorStep::Command(command, _) => {
|
||||
edits.command(command, &mut character_panel);
|
||||
continue;
|
||||
}
|
||||
_ => continue,
|
||||
};
|
||||
if let Some(range) = ending.take() {
|
||||
if let EditorInput::Text(text) = &input {
|
||||
edits.commit_marked(range, text);
|
||||
continue;
|
||||
}
|
||||
edits.drop_marked(range);
|
||||
}
|
||||
match input {
|
||||
EditorInput::Preedit { text, cursor, .. } => {
|
||||
let active = cursor.map(|bytes| byte_range_to_chars(&text, bytes));
|
||||
ending = edits.preedit(&text, active);
|
||||
}
|
||||
EditorInput::ImeCommit => ending = edits.session.preedit.take(),
|
||||
EditorInput::Text(text) => edits.done.changed |= edits.insert_typed(&text),
|
||||
EditorInput::Newline { .. } if edits.session.preedit.is_none() && mode.multiline() => {
|
||||
edits.done.changed |= edits.insert_text("\n", EditKind::Typed);
|
||||
}
|
||||
EditorInput::Tab if mode.takes_tab() => edits.done.changed |= edits.insert_text("\t", EditKind::Typed),
|
||||
EditorInput::Move(step, mods) => edits.motion(step, mods),
|
||||
EditorInput::Delete { forward, by, .. } => edits.done.changed |= edits.delete(forward, by),
|
||||
EditorInput::DeleteSurrounding { before, after, unit, .. } => edits.done.changed |= edits.delete_around(before, after, unit),
|
||||
EditorInput::Select { anchor, focus, .. } => {
|
||||
let lines = lines_of(&mut *edits.host, fallback);
|
||||
edits.end_composition();
|
||||
edits.selection = TextSelection { anchor: char_at(&lines, anchor), caret: char_at(&lines, focus) };
|
||||
}
|
||||
EditorInput::Edit(EditCommand::SelectAll) => edits.select_all(),
|
||||
EditorInput::Edit(EditCommand::Copy) if !masked => copied = edits.selected_text(),
|
||||
EditorInput::Edit(EditCommand::Cut) if !masked => {
|
||||
copied = edits.selected_text();
|
||||
edits.done.changed |= edits.delete_selection();
|
||||
}
|
||||
EditorInput::Edit(EditCommand::Paste) => {
|
||||
if let Some(text) = &pasted {
|
||||
edits.done.changed |= edits.insert_text(text, EditKind::Pasted);
|
||||
}
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
if let Some(range) = ending {
|
||||
edits.drop_marked(range);
|
||||
}
|
||||
let (copied, character_panel) = apply_steps(&mut edits, steps, mode, masked, pasted.as_deref(), fallback);
|
||||
// A press is the pass's last pointer event (H0), so the pass's editor input came before it.
|
||||
match press.phase {
|
||||
PressPhase::Down { start, .. } if start.button == craft_behavior::PointerButton::Primary => {
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
"options_narrow": 36.0,
|
||||
"status": 30.0,
|
||||
"tab": 30.0,
|
||||
"tab_large": 38.0,
|
||||
"title": 38.0
|
||||
},
|
||||
"checker": 4.0,
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
"options_narrow": 28.0,
|
||||
"status": 24.0,
|
||||
"tab": 26.0,
|
||||
"tab_large": 32.0,
|
||||
"title": 32.0
|
||||
},
|
||||
"checker": 4.0,
|
||||
|
||||
@@ -153,8 +153,10 @@ fn size_lines(out: &mut Lines, size: &SizeTokens) {
|
||||
let RailSizes { width, button } = rail;
|
||||
out.line("size.rail.width", len(*width));
|
||||
out.line("size.rail.button", len(*button));
|
||||
let BarSizes { title, tab, status, options, options_narrow } = bar;
|
||||
for (k, v) in [("title", title), ("tab", tab), ("status", status), ("options", options), ("options_narrow", options_narrow)] {
|
||||
let BarSizes { title, tab, tab_large, status, options, options_narrow } = bar;
|
||||
for (k, v) in
|
||||
[("title", title), ("tab", tab), ("tab_large", tab_large), ("status", status), ("options", options), ("options_narrow", options_narrow)]
|
||||
{
|
||||
out.line(&format!("size.bar.{k}"), len(*v));
|
||||
}
|
||||
out.line("size.panel_header", len(*panel_header));
|
||||
|
||||
@@ -102,6 +102,7 @@ pub(crate) fn leaves(b: &mut Preset) -> Vec<Leaf<'_>> {
|
||||
"base.size.rail.button" Num 16.0..=64.0 => s.rail.button;
|
||||
"base.size.bar.title" Num 16.0..=80.0 => s.bar.title;
|
||||
"base.size.bar.tab" Num 16.0..=64.0 => s.bar.tab;
|
||||
"base.size.bar.tab_large" Num 16.0..=80.0 => s.bar.tab_large;
|
||||
"base.size.bar.status" Num 16.0..=64.0 => s.bar.status;
|
||||
"base.size.bar.options" Num 16.0..=80.0 => s.bar.options;
|
||||
"base.size.bar.options_narrow" Num 16.0..=80.0 => s.bar.options_narrow;
|
||||
|
||||
@@ -225,6 +225,8 @@ pub struct BarSizes {
|
||||
pub title: f32,
|
||||
/// Tab strip.
|
||||
pub tab: f32,
|
||||
/// Tab strip in its large form: large document tabs.
|
||||
pub tab_large: f32,
|
||||
/// Status bar.
|
||||
pub status: f32,
|
||||
/// Tool options bar.
|
||||
|
||||
@@ -152,6 +152,7 @@ size.rail.width = 50
|
||||
size.rail.button = 36
|
||||
size.bar.title = 38
|
||||
size.bar.tab = 30
|
||||
size.bar.tab_large = 38
|
||||
size.bar.status = 30
|
||||
size.bar.options = 42
|
||||
size.bar.options_narrow = 36
|
||||
|
||||
@@ -152,6 +152,7 @@ size.rail.width = 40
|
||||
size.rail.button = 30
|
||||
size.bar.title = 32
|
||||
size.bar.tab = 26
|
||||
size.bar.tab_large = 32
|
||||
size.bar.status = 24
|
||||
size.bar.options = 36
|
||||
size.bar.options_narrow = 28
|
||||
|
||||
@@ -152,6 +152,7 @@ size.rail.width = 50
|
||||
size.rail.button = 36
|
||||
size.bar.title = 38
|
||||
size.bar.tab = 30
|
||||
size.bar.tab_large = 38
|
||||
size.bar.status = 30
|
||||
size.bar.options = 42
|
||||
size.bar.options_narrow = 36
|
||||
|
||||
@@ -152,6 +152,7 @@ size.rail.width = 40
|
||||
size.rail.button = 30
|
||||
size.bar.title = 32
|
||||
size.bar.tab = 26
|
||||
size.bar.tab_large = 32
|
||||
size.bar.status = 24
|
||||
size.bar.options = 36
|
||||
size.bar.options_narrow = 28
|
||||
|
||||
@@ -152,6 +152,7 @@ size.rail.width = 50
|
||||
size.rail.button = 36
|
||||
size.bar.title = 38
|
||||
size.bar.tab = 30
|
||||
size.bar.tab_large = 38
|
||||
size.bar.status = 30
|
||||
size.bar.options = 42
|
||||
size.bar.options_narrow = 36
|
||||
|
||||
@@ -152,6 +152,7 @@ size.rail.width = 40
|
||||
size.rail.button = 30
|
||||
size.bar.title = 32
|
||||
size.bar.tab = 26
|
||||
size.bar.tab_large = 32
|
||||
size.bar.status = 24
|
||||
size.bar.options = 36
|
||||
size.bar.options_narrow = 28
|
||||
|
||||
@@ -152,6 +152,7 @@ size.rail.width = 50
|
||||
size.rail.button = 36
|
||||
size.bar.title = 38
|
||||
size.bar.tab = 30
|
||||
size.bar.tab_large = 38
|
||||
size.bar.status = 30
|
||||
size.bar.options = 42
|
||||
size.bar.options_narrow = 36
|
||||
|
||||
@@ -152,6 +152,7 @@ size.rail.width = 40
|
||||
size.rail.button = 30
|
||||
size.bar.title = 32
|
||||
size.bar.tab = 26
|
||||
size.bar.tab_large = 32
|
||||
size.bar.status = 24
|
||||
size.bar.options = 36
|
||||
size.bar.options_narrow = 28
|
||||
|
||||
@@ -152,6 +152,7 @@ size.rail.width = 50
|
||||
size.rail.button = 36
|
||||
size.bar.title = 38
|
||||
size.bar.tab = 30
|
||||
size.bar.tab_large = 38
|
||||
size.bar.status = 30
|
||||
size.bar.options = 42
|
||||
size.bar.options_narrow = 36
|
||||
|
||||
@@ -152,6 +152,7 @@ size.rail.width = 40
|
||||
size.rail.button = 30
|
||||
size.bar.title = 32
|
||||
size.bar.tab = 26
|
||||
size.bar.tab_large = 32
|
||||
size.bar.status = 24
|
||||
size.bar.options = 36
|
||||
size.bar.options_narrow = 28
|
||||
|
||||
@@ -152,6 +152,7 @@ size.rail.width = 50
|
||||
size.rail.button = 36
|
||||
size.bar.title = 38
|
||||
size.bar.tab = 30
|
||||
size.bar.tab_large = 38
|
||||
size.bar.status = 30
|
||||
size.bar.options = 42
|
||||
size.bar.options_narrow = 36
|
||||
|
||||
@@ -152,6 +152,7 @@ size.rail.width = 40
|
||||
size.rail.button = 30
|
||||
size.bar.title = 32
|
||||
size.bar.tab = 26
|
||||
size.bar.tab_large = 32
|
||||
size.bar.status = 24
|
||||
size.bar.options = 36
|
||||
size.bar.options_narrow = 28
|
||||
|
||||
@@ -152,6 +152,7 @@ size.rail.width = 50
|
||||
size.rail.button = 36
|
||||
size.bar.title = 38
|
||||
size.bar.tab = 30
|
||||
size.bar.tab_large = 38
|
||||
size.bar.status = 30
|
||||
size.bar.options = 42
|
||||
size.bar.options_narrow = 36
|
||||
|
||||
@@ -152,6 +152,7 @@ size.rail.width = 40
|
||||
size.rail.button = 30
|
||||
size.bar.title = 32
|
||||
size.bar.tab = 26
|
||||
size.bar.tab_large = 32
|
||||
size.bar.status = 24
|
||||
size.bar.options = 36
|
||||
size.bar.options_narrow = 28
|
||||
|
||||
@@ -152,6 +152,7 @@ size.rail.width = 50
|
||||
size.rail.button = 36
|
||||
size.bar.title = 38
|
||||
size.bar.tab = 30
|
||||
size.bar.tab_large = 38
|
||||
size.bar.status = 30
|
||||
size.bar.options = 42
|
||||
size.bar.options_narrow = 36
|
||||
|
||||
@@ -152,6 +152,7 @@ size.rail.width = 40
|
||||
size.rail.button = 30
|
||||
size.bar.title = 32
|
||||
size.bar.tab = 26
|
||||
size.bar.tab_large = 32
|
||||
size.bar.status = 24
|
||||
size.bar.options = 36
|
||||
size.bar.options_narrow = 28
|
||||
|
||||
@@ -152,6 +152,7 @@ size.rail.width = 50
|
||||
size.rail.button = 36
|
||||
size.bar.title = 38
|
||||
size.bar.tab = 30
|
||||
size.bar.tab_large = 38
|
||||
size.bar.status = 30
|
||||
size.bar.options = 42
|
||||
size.bar.options_narrow = 36
|
||||
|
||||
@@ -152,6 +152,7 @@ size.rail.width = 40
|
||||
size.rail.button = 30
|
||||
size.bar.title = 32
|
||||
size.bar.tab = 26
|
||||
size.bar.tab_large = 32
|
||||
size.bar.status = 24
|
||||
size.bar.options = 36
|
||||
size.bar.options_narrow = 28
|
||||
|
||||
@@ -152,6 +152,7 @@ size.rail.width = 50
|
||||
size.rail.button = 36
|
||||
size.bar.title = 38
|
||||
size.bar.tab = 30
|
||||
size.bar.tab_large = 38
|
||||
size.bar.status = 30
|
||||
size.bar.options = 42
|
||||
size.bar.options_narrow = 36
|
||||
|
||||
@@ -152,6 +152,7 @@ size.rail.width = 40
|
||||
size.rail.button = 30
|
||||
size.bar.title = 32
|
||||
size.bar.tab = 26
|
||||
size.bar.tab_large = 32
|
||||
size.bar.status = 24
|
||||
size.bar.options = 36
|
||||
size.bar.options_narrow = 28
|
||||
|
||||
@@ -152,6 +152,7 @@ size.rail.width = 50
|
||||
size.rail.button = 36
|
||||
size.bar.title = 38
|
||||
size.bar.tab = 30
|
||||
size.bar.tab_large = 38
|
||||
size.bar.status = 30
|
||||
size.bar.options = 42
|
||||
size.bar.options_narrow = 36
|
||||
|
||||
@@ -152,6 +152,7 @@ size.rail.width = 40
|
||||
size.rail.button = 30
|
||||
size.bar.title = 32
|
||||
size.bar.tab = 26
|
||||
size.bar.tab_large = 32
|
||||
size.bar.status = 24
|
||||
size.bar.options = 36
|
||||
size.bar.options_narrow = 28
|
||||
|
||||
@@ -152,6 +152,7 @@ size.rail.width = 50
|
||||
size.rail.button = 36
|
||||
size.bar.title = 38
|
||||
size.bar.tab = 30
|
||||
size.bar.tab_large = 38
|
||||
size.bar.status = 30
|
||||
size.bar.options = 42
|
||||
size.bar.options_narrow = 36
|
||||
|
||||
@@ -152,6 +152,7 @@ size.rail.width = 40
|
||||
size.rail.button = 30
|
||||
size.bar.title = 32
|
||||
size.bar.tab = 26
|
||||
size.bar.tab_large = 32
|
||||
size.bar.status = 24
|
||||
size.bar.options = 36
|
||||
size.bar.options_narrow = 28
|
||||
|
||||
@@ -152,6 +152,7 @@ size.rail.width = 50
|
||||
size.rail.button = 36
|
||||
size.bar.title = 38
|
||||
size.bar.tab = 30
|
||||
size.bar.tab_large = 38
|
||||
size.bar.status = 30
|
||||
size.bar.options = 42
|
||||
size.bar.options_narrow = 36
|
||||
|
||||
@@ -152,6 +152,7 @@ size.rail.width = 40
|
||||
size.rail.button = 30
|
||||
size.bar.title = 32
|
||||
size.bar.tab = 26
|
||||
size.bar.tab_large = 32
|
||||
size.bar.status = 24
|
||||
size.bar.options = 36
|
||||
size.bar.options_narrow = 28
|
||||
|
||||
@@ -152,6 +152,7 @@ size.rail.width = 50
|
||||
size.rail.button = 36
|
||||
size.bar.title = 38
|
||||
size.bar.tab = 30
|
||||
size.bar.tab_large = 38
|
||||
size.bar.status = 30
|
||||
size.bar.options = 42
|
||||
size.bar.options_narrow = 36
|
||||
|
||||
@@ -152,6 +152,7 @@ size.rail.width = 40
|
||||
size.rail.button = 30
|
||||
size.bar.title = 32
|
||||
size.bar.tab = 26
|
||||
size.bar.tab_large = 32
|
||||
size.bar.status = 24
|
||||
size.bar.options = 36
|
||||
size.bar.options_narrow = 28
|
||||
|
||||
@@ -152,6 +152,7 @@ size.rail.width = 50
|
||||
size.rail.button = 36
|
||||
size.bar.title = 38
|
||||
size.bar.tab = 30
|
||||
size.bar.tab_large = 38
|
||||
size.bar.status = 30
|
||||
size.bar.options = 42
|
||||
size.bar.options_narrow = 36
|
||||
|
||||
@@ -152,6 +152,7 @@ size.rail.width = 40
|
||||
size.rail.button = 30
|
||||
size.bar.title = 32
|
||||
size.bar.tab = 26
|
||||
size.bar.tab_large = 32
|
||||
size.bar.status = 24
|
||||
size.bar.options = 36
|
||||
size.bar.options_narrow = 28
|
||||
|
||||
@@ -152,6 +152,7 @@ size.rail.width = 50
|
||||
size.rail.button = 36
|
||||
size.bar.title = 38
|
||||
size.bar.tab = 30
|
||||
size.bar.tab_large = 38
|
||||
size.bar.status = 30
|
||||
size.bar.options = 42
|
||||
size.bar.options_narrow = 36
|
||||
|
||||
@@ -152,6 +152,7 @@ size.rail.width = 40
|
||||
size.rail.button = 30
|
||||
size.bar.title = 32
|
||||
size.bar.tab = 26
|
||||
size.bar.tab_large = 32
|
||||
size.bar.status = 24
|
||||
size.bar.options = 36
|
||||
size.bar.options_narrow = 28
|
||||
|
||||
@@ -152,6 +152,7 @@ size.rail.width = 50
|
||||
size.rail.button = 36
|
||||
size.bar.title = 38
|
||||
size.bar.tab = 30
|
||||
size.bar.tab_large = 38
|
||||
size.bar.status = 30
|
||||
size.bar.options = 42
|
||||
size.bar.options_narrow = 36
|
||||
|
||||
@@ -152,6 +152,7 @@ size.rail.width = 40
|
||||
size.rail.button = 30
|
||||
size.bar.title = 32
|
||||
size.bar.tab = 26
|
||||
size.bar.tab_large = 32
|
||||
size.bar.status = 24
|
||||
size.bar.options = 36
|
||||
size.bar.options_narrow = 28
|
||||
|
||||
@@ -152,6 +152,7 @@ size.rail.width = 50
|
||||
size.rail.button = 36
|
||||
size.bar.title = 38
|
||||
size.bar.tab = 30
|
||||
size.bar.tab_large = 38
|
||||
size.bar.status = 30
|
||||
size.bar.options = 42
|
||||
size.bar.options_narrow = 36
|
||||
|
||||
@@ -152,6 +152,7 @@ size.rail.width = 40
|
||||
size.rail.button = 30
|
||||
size.bar.title = 32
|
||||
size.bar.tab = 26
|
||||
size.bar.tab_large = 32
|
||||
size.bar.status = 24
|
||||
size.bar.options = 36
|
||||
size.bar.options_narrow = 28
|
||||
|
||||
@@ -152,6 +152,7 @@ size.rail.width = 50
|
||||
size.rail.button = 36
|
||||
size.bar.title = 38
|
||||
size.bar.tab = 30
|
||||
size.bar.tab_large = 38
|
||||
size.bar.status = 30
|
||||
size.bar.options = 42
|
||||
size.bar.options_narrow = 36
|
||||
|
||||
@@ -152,6 +152,7 @@ size.rail.width = 40
|
||||
size.rail.button = 30
|
||||
size.bar.title = 32
|
||||
size.bar.tab = 26
|
||||
size.bar.tab_large = 32
|
||||
size.bar.status = 24
|
||||
size.bar.options = 36
|
||||
size.bar.options_narrow = 28
|
||||
|
||||
@@ -152,6 +152,7 @@ size.rail.width = 50
|
||||
size.rail.button = 36
|
||||
size.bar.title = 38
|
||||
size.bar.tab = 30
|
||||
size.bar.tab_large = 38
|
||||
size.bar.status = 30
|
||||
size.bar.options = 42
|
||||
size.bar.options_narrow = 36
|
||||
|
||||
@@ -152,6 +152,7 @@ size.rail.width = 50
|
||||
size.rail.button = 36
|
||||
size.bar.title = 38
|
||||
size.bar.tab = 30
|
||||
size.bar.tab_large = 38
|
||||
size.bar.status = 30
|
||||
size.bar.options = 42
|
||||
size.bar.options_narrow = 36
|
||||
|
||||
@@ -152,6 +152,7 @@ size.rail.width = 40
|
||||
size.rail.button = 30
|
||||
size.bar.title = 32
|
||||
size.bar.tab = 26
|
||||
size.bar.tab_large = 32
|
||||
size.bar.status = 24
|
||||
size.bar.options = 36
|
||||
size.bar.options_narrow = 28
|
||||
|
||||
@@ -152,6 +152,7 @@ size.rail.width = 50
|
||||
size.rail.button = 36
|
||||
size.bar.title = 38
|
||||
size.bar.tab = 30
|
||||
size.bar.tab_large = 38
|
||||
size.bar.status = 30
|
||||
size.bar.options = 42
|
||||
size.bar.options_narrow = 36
|
||||
|
||||
@@ -152,6 +152,7 @@ size.rail.width = 40
|
||||
size.rail.button = 30
|
||||
size.bar.title = 32
|
||||
size.bar.tab = 26
|
||||
size.bar.tab_large = 32
|
||||
size.bar.status = 24
|
||||
size.bar.options = 36
|
||||
size.bar.options_narrow = 28
|
||||
|
||||
@@ -152,6 +152,7 @@ size.rail.width = 50
|
||||
size.rail.button = 36
|
||||
size.bar.title = 38
|
||||
size.bar.tab = 30
|
||||
size.bar.tab_large = 38
|
||||
size.bar.status = 30
|
||||
size.bar.options = 42
|
||||
size.bar.options_narrow = 36
|
||||
|
||||
@@ -152,6 +152,7 @@ size.rail.width = 40
|
||||
size.rail.button = 30
|
||||
size.bar.title = 32
|
||||
size.bar.tab = 26
|
||||
size.bar.tab_large = 32
|
||||
size.bar.status = 24
|
||||
size.bar.options = 36
|
||||
size.bar.options_narrow = 28
|
||||
|
||||
@@ -152,6 +152,7 @@ size.rail.width = 50
|
||||
size.rail.button = 36
|
||||
size.bar.title = 38
|
||||
size.bar.tab = 30
|
||||
size.bar.tab_large = 38
|
||||
size.bar.status = 30
|
||||
size.bar.options = 42
|
||||
size.bar.options_narrow = 36
|
||||
|
||||
@@ -152,6 +152,7 @@ size.rail.width = 40
|
||||
size.rail.button = 30
|
||||
size.bar.title = 32
|
||||
size.bar.tab = 26
|
||||
size.bar.tab_large = 32
|
||||
size.bar.status = 24
|
||||
size.bar.options = 36
|
||||
size.bar.options_narrow = 28
|
||||
|
||||
@@ -152,6 +152,7 @@ size.rail.width = 50
|
||||
size.rail.button = 36
|
||||
size.bar.title = 38
|
||||
size.bar.tab = 30
|
||||
size.bar.tab_large = 38
|
||||
size.bar.status = 30
|
||||
size.bar.options = 42
|
||||
size.bar.options_narrow = 36
|
||||
|
||||
@@ -152,6 +152,7 @@ size.rail.width = 40
|
||||
size.rail.button = 30
|
||||
size.bar.title = 32
|
||||
size.bar.tab = 26
|
||||
size.bar.tab_large = 32
|
||||
size.bar.status = 24
|
||||
size.bar.options = 36
|
||||
size.bar.options_narrow = 28
|
||||
|
||||
@@ -152,6 +152,7 @@ size.rail.width = 50
|
||||
size.rail.button = 36
|
||||
size.bar.title = 38
|
||||
size.bar.tab = 30
|
||||
size.bar.tab_large = 38
|
||||
size.bar.status = 30
|
||||
size.bar.options = 42
|
||||
size.bar.options_narrow = 36
|
||||
|
||||
@@ -152,6 +152,7 @@ size.rail.width = 40
|
||||
size.rail.button = 30
|
||||
size.bar.title = 32
|
||||
size.bar.tab = 26
|
||||
size.bar.tab_large = 32
|
||||
size.bar.status = 24
|
||||
size.bar.options = 36
|
||||
size.bar.options_narrow = 28
|
||||
|
||||
@@ -152,6 +152,7 @@ size.rail.width = 50
|
||||
size.rail.button = 36
|
||||
size.bar.title = 38
|
||||
size.bar.tab = 30
|
||||
size.bar.tab_large = 38
|
||||
size.bar.status = 30
|
||||
size.bar.options = 42
|
||||
size.bar.options_narrow = 36
|
||||
|
||||
@@ -152,6 +152,7 @@ size.rail.width = 40
|
||||
size.rail.button = 30
|
||||
size.bar.title = 32
|
||||
size.bar.tab = 26
|
||||
size.bar.tab_large = 32
|
||||
size.bar.status = 24
|
||||
size.bar.options = 36
|
||||
size.bar.options_narrow = 28
|
||||
|
||||
@@ -152,6 +152,7 @@ size.rail.width = 50
|
||||
size.rail.button = 36
|
||||
size.bar.title = 38
|
||||
size.bar.tab = 30
|
||||
size.bar.tab_large = 38
|
||||
size.bar.status = 30
|
||||
size.bar.options = 42
|
||||
size.bar.options_narrow = 36
|
||||
|
||||
@@ -152,6 +152,7 @@ size.rail.width = 40
|
||||
size.rail.button = 30
|
||||
size.bar.title = 32
|
||||
size.bar.tab = 26
|
||||
size.bar.tab_large = 32
|
||||
size.bar.status = 24
|
||||
size.bar.options = 36
|
||||
size.bar.options_narrow = 28
|
||||
|
||||
@@ -152,6 +152,7 @@ size.rail.width = 50
|
||||
size.rail.button = 36
|
||||
size.bar.title = 38
|
||||
size.bar.tab = 30
|
||||
size.bar.tab_large = 38
|
||||
size.bar.status = 30
|
||||
size.bar.options = 42
|
||||
size.bar.options_narrow = 36
|
||||
|
||||
@@ -152,6 +152,7 @@ size.rail.width = 40
|
||||
size.rail.button = 30
|
||||
size.bar.title = 32
|
||||
size.bar.tab = 26
|
||||
size.bar.tab_large = 32
|
||||
size.bar.status = 24
|
||||
size.bar.options = 36
|
||||
size.bar.options_narrow = 28
|
||||
|
||||
@@ -152,6 +152,7 @@ size.rail.width = 50
|
||||
size.rail.button = 36
|
||||
size.bar.title = 38
|
||||
size.bar.tab = 30
|
||||
size.bar.tab_large = 38
|
||||
size.bar.status = 30
|
||||
size.bar.options = 42
|
||||
size.bar.options_narrow = 36
|
||||
|
||||
@@ -152,6 +152,7 @@ size.rail.width = 40
|
||||
size.rail.button = 30
|
||||
size.bar.title = 32
|
||||
size.bar.tab = 26
|
||||
size.bar.tab_large = 32
|
||||
size.bar.status = 24
|
||||
size.bar.options = 36
|
||||
size.bar.options_narrow = 28
|
||||
|
||||
@@ -152,6 +152,7 @@ size.rail.width = 50
|
||||
size.rail.button = 36
|
||||
size.bar.title = 38
|
||||
size.bar.tab = 30
|
||||
size.bar.tab_large = 38
|
||||
size.bar.status = 30
|
||||
size.bar.options = 42
|
||||
size.bar.options_narrow = 36
|
||||
|
||||
@@ -152,6 +152,7 @@ size.rail.width = 40
|
||||
size.rail.button = 30
|
||||
size.bar.title = 32
|
||||
size.bar.tab = 26
|
||||
size.bar.tab_large = 32
|
||||
size.bar.status = 24
|
||||
size.bar.options = 36
|
||||
size.bar.options_narrow = 28
|
||||
|
||||
@@ -152,6 +152,7 @@ size.rail.width = 50
|
||||
size.rail.button = 36
|
||||
size.bar.title = 38
|
||||
size.bar.tab = 30
|
||||
size.bar.tab_large = 38
|
||||
size.bar.status = 30
|
||||
size.bar.options = 42
|
||||
size.bar.options_narrow = 36
|
||||
|
||||
@@ -152,6 +152,7 @@ size.rail.width = 40
|
||||
size.rail.button = 30
|
||||
size.bar.title = 32
|
||||
size.bar.tab = 26
|
||||
size.bar.tab_large = 32
|
||||
size.bar.status = 24
|
||||
size.bar.options = 36
|
||||
size.bar.options_narrow = 28
|
||||
|
||||
@@ -152,6 +152,7 @@ size.rail.width = 50
|
||||
size.rail.button = 36
|
||||
size.bar.title = 38
|
||||
size.bar.tab = 30
|
||||
size.bar.tab_large = 38
|
||||
size.bar.status = 30
|
||||
size.bar.options = 42
|
||||
size.bar.options_narrow = 36
|
||||
|
||||
@@ -152,6 +152,7 @@ size.rail.width = 40
|
||||
size.rail.button = 30
|
||||
size.bar.title = 32
|
||||
size.bar.tab = 26
|
||||
size.bar.tab_large = 32
|
||||
size.bar.status = 24
|
||||
size.bar.options = 36
|
||||
size.bar.options_narrow = 28
|
||||
|
||||
@@ -152,6 +152,7 @@ size.rail.width = 50
|
||||
size.rail.button = 36
|
||||
size.bar.title = 38
|
||||
size.bar.tab = 30
|
||||
size.bar.tab_large = 38
|
||||
size.bar.status = 30
|
||||
size.bar.options = 42
|
||||
size.bar.options_narrow = 36
|
||||
|
||||
@@ -152,6 +152,7 @@ size.rail.width = 40
|
||||
size.rail.button = 30
|
||||
size.bar.title = 32
|
||||
size.bar.tab = 26
|
||||
size.bar.tab_large = 32
|
||||
size.bar.status = 24
|
||||
size.bar.options = 36
|
||||
size.bar.options_narrow = 28
|
||||
|
||||
@@ -152,6 +152,7 @@ size.rail.width = 50
|
||||
size.rail.button = 36
|
||||
size.bar.title = 38
|
||||
size.bar.tab = 30
|
||||
size.bar.tab_large = 38
|
||||
size.bar.status = 30
|
||||
size.bar.options = 42
|
||||
size.bar.options_narrow = 36
|
||||
|
||||
@@ -152,6 +152,7 @@ size.rail.width = 40
|
||||
size.rail.button = 30
|
||||
size.bar.title = 32
|
||||
size.bar.tab = 26
|
||||
size.bar.tab_large = 32
|
||||
size.bar.status = 24
|
||||
size.bar.options = 36
|
||||
size.bar.options_narrow = 28
|
||||
|
||||
@@ -152,6 +152,7 @@ size.rail.width = 50
|
||||
size.rail.button = 36
|
||||
size.bar.title = 38
|
||||
size.bar.tab = 30
|
||||
size.bar.tab_large = 38
|
||||
size.bar.status = 30
|
||||
size.bar.options = 42
|
||||
size.bar.options_narrow = 36
|
||||
|
||||
@@ -152,6 +152,7 @@ size.rail.width = 40
|
||||
size.rail.button = 30
|
||||
size.bar.title = 32
|
||||
size.bar.tab = 26
|
||||
size.bar.tab_large = 32
|
||||
size.bar.status = 24
|
||||
size.bar.options = 36
|
||||
size.bar.options_narrow = 28
|
||||
|
||||
@@ -152,6 +152,7 @@ size.rail.width = 50
|
||||
size.rail.button = 36
|
||||
size.bar.title = 38
|
||||
size.bar.tab = 30
|
||||
size.bar.tab_large = 38
|
||||
size.bar.status = 30
|
||||
size.bar.options = 42
|
||||
size.bar.options_narrow = 36
|
||||
|
||||
@@ -152,6 +152,7 @@ size.rail.width = 40
|
||||
size.rail.button = 30
|
||||
size.bar.title = 32
|
||||
size.bar.tab = 26
|
||||
size.bar.tab_large = 32
|
||||
size.bar.status = 24
|
||||
size.bar.options = 36
|
||||
size.bar.options_narrow = 28
|
||||
|
||||
@@ -152,6 +152,7 @@ size.rail.width = 50
|
||||
size.rail.button = 36
|
||||
size.bar.title = 38
|
||||
size.bar.tab = 30
|
||||
size.bar.tab_large = 38
|
||||
size.bar.status = 30
|
||||
size.bar.options = 42
|
||||
size.bar.options_narrow = 36
|
||||
|
||||
@@ -152,6 +152,7 @@ size.rail.width = 40
|
||||
size.rail.button = 30
|
||||
size.bar.title = 32
|
||||
size.bar.tab = 26
|
||||
size.bar.tab_large = 32
|
||||
size.bar.status = 24
|
||||
size.bar.options = 36
|
||||
size.bar.options_narrow = 28
|
||||
|
||||
@@ -152,6 +152,7 @@ size.rail.width = 50
|
||||
size.rail.button = 36
|
||||
size.bar.title = 38
|
||||
size.bar.tab = 30
|
||||
size.bar.tab_large = 38
|
||||
size.bar.status = 30
|
||||
size.bar.options = 42
|
||||
size.bar.options_narrow = 36
|
||||
|
||||
@@ -152,6 +152,7 @@ size.rail.width = 40
|
||||
size.rail.button = 30
|
||||
size.bar.title = 32
|
||||
size.bar.tab = 26
|
||||
size.bar.tab_large = 32
|
||||
size.bar.status = 24
|
||||
size.bar.options = 36
|
||||
size.bar.options_narrow = 28
|
||||
|
||||
@@ -152,6 +152,7 @@ size.rail.width = 50
|
||||
size.rail.button = 36
|
||||
size.bar.title = 38
|
||||
size.bar.tab = 30
|
||||
size.bar.tab_large = 38
|
||||
size.bar.status = 30
|
||||
size.bar.options = 42
|
||||
size.bar.options_narrow = 36
|
||||
|
||||
@@ -152,6 +152,7 @@ size.rail.width = 40
|
||||
size.rail.button = 30
|
||||
size.bar.title = 32
|
||||
size.bar.tab = 26
|
||||
size.bar.tab_large = 32
|
||||
size.bar.status = 24
|
||||
size.bar.options = 36
|
||||
size.bar.options_narrow = 28
|
||||
|
||||
+1
@@ -152,6 +152,7 @@ size.rail.width = 50
|
||||
size.rail.button = 36
|
||||
size.bar.title = 38
|
||||
size.bar.tab = 30
|
||||
size.bar.tab_large = 38
|
||||
size.bar.status = 30
|
||||
size.bar.options = 42
|
||||
size.bar.options_narrow = 36
|
||||
|
||||
@@ -152,6 +152,7 @@ size.rail.width = 40
|
||||
size.rail.button = 30
|
||||
size.bar.title = 32
|
||||
size.bar.tab = 26
|
||||
size.bar.tab_large = 32
|
||||
size.bar.status = 24
|
||||
size.bar.options = 36
|
||||
size.bar.options_narrow = 28
|
||||
|
||||
@@ -152,6 +152,7 @@ size.rail.width = 50
|
||||
size.rail.button = 36
|
||||
size.bar.title = 38
|
||||
size.bar.tab = 30
|
||||
size.bar.tab_large = 38
|
||||
size.bar.status = 30
|
||||
size.bar.options = 42
|
||||
size.bar.options_narrow = 36
|
||||
|
||||
@@ -152,6 +152,7 @@ size.rail.width = 40
|
||||
size.rail.button = 30
|
||||
size.bar.title = 32
|
||||
size.bar.tab = 26
|
||||
size.bar.tab_large = 32
|
||||
size.bar.status = 24
|
||||
size.bar.options = 36
|
||||
size.bar.options_narrow = 28
|
||||
|
||||
+1
@@ -152,6 +152,7 @@ size.rail.width = 50
|
||||
size.rail.button = 36
|
||||
size.bar.title = 38
|
||||
size.bar.tab = 30
|
||||
size.bar.tab_large = 38
|
||||
size.bar.status = 30
|
||||
size.bar.options = 42
|
||||
size.bar.options_narrow = 36
|
||||
|
||||
@@ -152,6 +152,7 @@ size.rail.width = 40
|
||||
size.rail.button = 30
|
||||
size.bar.title = 32
|
||||
size.bar.tab = 26
|
||||
size.bar.tab_large = 32
|
||||
size.bar.status = 24
|
||||
size.bar.options = 36
|
||||
size.bar.options_narrow = 28
|
||||
|
||||
@@ -451,6 +451,7 @@ fn a_quick_drag_in_one_frame_starts_at_the_press() {
|
||||
assert_eq!((events.first(), events.last()), (Some(&"begin"), Some(&"commit")), "{events:?}");
|
||||
}
|
||||
|
||||
/// Control is pressed once the resize has started: on macOS a press with Control held is a secondary click.
|
||||
#[trial]
|
||||
fn the_control_key_held_during_a_resize_turns_snapping_off() {
|
||||
for (held, right) in [(Modifiers::NONE, 310.0), (Modifiers::CTRL, 307.0)] {
|
||||
@@ -459,7 +460,13 @@ fn the_control_key_held_during_a_resize_turns_snapping_off() {
|
||||
s.snap_x = Some(310.0);
|
||||
s
|
||||
});
|
||||
rig.drag(rig.at(300.0, 220.0), rig.at(307.0, 220.0), held);
|
||||
let (from, to) = (rig.at(300.0, 220.0), rig.at(307.0, 220.0));
|
||||
rig.press(from);
|
||||
rig.frames.hold(held);
|
||||
rig.move_to(from.lerp(to, 0.5));
|
||||
rig.move_to(to);
|
||||
rig.release(to);
|
||||
rig.frames.hold(Modifiers::NONE);
|
||||
assert!((rig.rect().x1 - right).abs() < 1e-6, "{held:?}: {:?}", rig.rect());
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user