mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-26 02:09:00 +00:00
ui-contract: port fields in upstream's literals and calls (span link, run link colour, fill raster, Id::unique)
This commit is contained in:
@@ -112,7 +112,7 @@ pub(crate) fn fill_of(entry: Entry) -> Option<(&'static [u8], [u8; 4])> {
|
||||
/// A fill document in white at `px` x `px` physical pixels, drawn as drawn and never mirrored: no app icon is
|
||||
/// directional.
|
||||
pub(crate) fn rasterise_fill(svg: &[u8], px: u32) -> ColorImage {
|
||||
image(draw(svg, None, px, 0.0, false), px, || "app icon fill".to_owned())
|
||||
image(draw(svg, None, None, px, 0.0, false), px, false, || "app icon fill".to_owned())
|
||||
}
|
||||
|
||||
/// The position of the icon called `name` in the catalog.
|
||||
|
||||
@@ -376,6 +376,7 @@ impl LayoutQuery<'_> {
|
||||
highlight: span.highlight,
|
||||
underline: span.underline,
|
||||
strong: span.strong,
|
||||
link: span.link,
|
||||
flag: span.flag,
|
||||
})
|
||||
.collect();
|
||||
@@ -388,6 +389,7 @@ impl LayoutQuery<'_> {
|
||||
ltr: self.run.ltr,
|
||||
align: self.run.align,
|
||||
rotation: self.run.rotation,
|
||||
link_color: self.run.link_color,
|
||||
},
|
||||
tokens: self.tokens,
|
||||
token_values: self.token_values.clone(),
|
||||
|
||||
@@ -170,7 +170,7 @@ fn a_second_finger_cancels_an_open_press_and_two_fingers_moving_together_give_th
|
||||
|
||||
// PLAN: the sheet pans a `Canvas` with `NavigationOptions::touch_gestures`; ui-contract's trials cannot reach
|
||||
// ui-canvas, so the wheel share a taker reads is what this trial checks.
|
||||
let id = Id::new("pan_taker");
|
||||
let id = Id::unique("pan_taker");
|
||||
let pans: Rc<RefCell<Vec<Vec2>>> = Rc::default();
|
||||
let sink = pans.clone();
|
||||
let mut show_taker = move |ui: &mut Ui| {
|
||||
|
||||
Reference in New Issue
Block a user