Port · Parity: dark shots judged; the status shot waits out the tooltip; comments one short line
This commit is contained in:
16 files changed
+18
-18
No files matched your search
@@ -86,7 +86,7 @@ impl Avatar {
|
||||
}
|
||||
}
|
||||
|
||||
/// A square picture: gpui clips pictures to rectangles, so a cropped one keeps square corners.
|
||||
/// A picture, cropped to fill the avatar.
|
||||
pub fn image(mut self, source: impl Into<ImageSource>) -> Self {
|
||||
self.image = Some(source.into());
|
||||
self
|
||||
|
||||
@@ -177,7 +177,7 @@ fn units_rest_on_the_bottom_of_a_statistics_number(cx: &mut TestAppContext) {
|
||||
}
|
||||
}
|
||||
|
||||
/// A lone digit in extra-small text, whose line is no whole number of device pixels.
|
||||
/// A lone digit whose line is no whole device pixel.
|
||||
struct Nine;
|
||||
|
||||
impl Render for Nine {
|
||||
|
||||
@@ -148,7 +148,7 @@ fn every_chart_fills_a_column_its_block_measures_by_content(cx: &mut TestAppCont
|
||||
);
|
||||
}
|
||||
|
||||
/// A converter in a 460px box beside a card 260 wide, in a 280px row.
|
||||
/// A converter squeezed beside a card in a 280px row.
|
||||
struct Squeezed;
|
||||
|
||||
impl Render for Squeezed {
|
||||
|
||||
+1
-1
@@ -125,7 +125,7 @@ impl RenderOnce for Input {
|
||||
.flex_1()
|
||||
.min_w_0()
|
||||
.child(self.state)
|
||||
// An empty strut keeps the frame's inset to type in; squeezed, it spills unseen.
|
||||
// An empty strut keeps the frame's inset to type in.
|
||||
.child(div().px(theme.control_padding(self.size)).border_x_1()),
|
||||
)
|
||||
.when(self.clearable && !empty && !disabled, |frame| {
|
||||
|
||||
@@ -28,7 +28,7 @@ fn angle_at(bounds: Bounds<Pixels>, at: Point<Pixels>, snap: bool) -> f32 {
|
||||
|
||||
type OnTurn = Rc<dyn Fn(f32, &mut Window, &mut App)>;
|
||||
|
||||
/// An svg turned to its angle, in degrees clockwise from straight up, inside a ring with a knob at that angle. A drag on the knob turns it, Shift snapping to 15°; with focus, Left and Right turn it by 15°. gpui turns svgs alone, so the picture is an svg path.
|
||||
/// An svg turned clockwise by degrees, with a knob to drag.
|
||||
#[derive(IntoElement)]
|
||||
pub struct Rotatable {
|
||||
id: ElementId,
|
||||
|
||||
+1
-1
@@ -68,7 +68,7 @@ fn opened(cx: &mut TestAppContext, reduced: bool) -> &mut VisualTestContext {
|
||||
cx
|
||||
}
|
||||
|
||||
/// Presses on the grab and drags it down by `dy`, past gpui's drag threshold.
|
||||
/// Presses the grab and drags it down by `dy`.
|
||||
fn pull(cx: &mut VisualTestContext, dy: f32) -> Point<Pixels> {
|
||||
let rest = body(cx).origin;
|
||||
let grab = point(rest.x + px(10.0), rest.y - px(28.0));
|
||||
|
||||
+1
-1
@@ -403,7 +403,7 @@ fn effects_keep_their_content_and_let_presses_through(cx: &mut TestAppContext) {
|
||||
assert_eq!(view.read_with(cx, |effects, _| effects.presses), 1);
|
||||
}
|
||||
|
||||
/// Rows rising in, in a sized box down a column that fills a row.
|
||||
/// Rows rising in a sized box.
|
||||
struct Rising;
|
||||
|
||||
impl Render for Rising {
|
||||
|
||||
@@ -63,7 +63,7 @@ pub(super) fn arrive<E: Styled>(element: E, entrance: Entrance, t: f32) -> E {
|
||||
let t = ease_out_cubic(t);
|
||||
match entrance {
|
||||
Entrance::Fade => element.opacity(t),
|
||||
// Padding, as taffy's size cache drops a margin that collapses through a block.
|
||||
// Padding: taffy's size cache drops a collapsed margin.
|
||||
Entrance::Rise => element.opacity(t).pt(NUDGE * 2.0 * (1.0 - t)),
|
||||
Entrance::Slide => element.opacity(t).ml(NUDGE * -4.0 * (1.0 - t)),
|
||||
}
|
||||
|
||||
@@ -383,7 +383,7 @@ impl Palette {
|
||||
)
|
||||
}),
|
||||
);
|
||||
// Padding grows the box a scrim centers, as a margin taffy kept would.
|
||||
// Padding grows the box the scrim centers.
|
||||
div().child(card).with_animation(
|
||||
(self.id, "in"),
|
||||
Animation::new(motion::duration(motion::BASE, cx)).with_easing(motion::ease_out_cubic),
|
||||
|
||||
@@ -237,7 +237,7 @@ impl RenderOnce for Dialog {
|
||||
})
|
||||
.into_any_element()
|
||||
} else {
|
||||
// Padding grows the box the scrim centers, as a margin taffy kept would.
|
||||
// Padding grows the box the scrim centers.
|
||||
div()
|
||||
.child(card)
|
||||
.with_animation((self.id.clone(), "in"), arrive, |card, t| {
|
||||
|
||||
@@ -433,7 +433,7 @@ fn a_popover_opened_by_its_owner_takes_no_icon() {
|
||||
let _ = Popover::with_opener("own", |_| div(), |_, _, _| div()).icon(IconName::Clock);
|
||||
}
|
||||
|
||||
/// A dialog open from the first frame, with a body the test can find.
|
||||
/// A dialog open from the first frame.
|
||||
struct Rising;
|
||||
|
||||
impl Render for Rising {
|
||||
|
||||
@@ -33,7 +33,7 @@ pub(crate) fn framed(ratio: f32, cx: &App) -> Div {
|
||||
frame
|
||||
}
|
||||
|
||||
/// Themed `img()` that fills the box it is given; a `Cover` crop keeps its rounded corners.
|
||||
/// Themed `img()` that fills the box it is given.
|
||||
#[derive(IntoElement)]
|
||||
pub struct Image {
|
||||
id: ElementId,
|
||||
|
||||
@@ -16,7 +16,7 @@ fn nested() -> bool {
|
||||
LAYERS.with_borrow(|layers| !layers.is_empty())
|
||||
}
|
||||
|
||||
/// Draws `child` over the page, as gpui's `deferred` does. gpui paints deferred draws by priority alone, so what is raised inside something raised is laid out and drawn last within it, under `id`: a list opened in a dialog lies over the dialog and keeps its state.
|
||||
/// Draws `child` over the page; inside a raise, last within it.
|
||||
pub fn raise(id: impl Into<ElementId>, child: impl IntoElement) -> Raised {
|
||||
let layer = Layer {
|
||||
child: child.into_any_element(),
|
||||
|
||||
Reference in new issue
Block a user