Port · Parity: the last long comments are short
This commit is contained in:
1 parent
c59d19645d
commit
2da09c1947
4 files changed
+4
-4
No files matched your search
@@ -114,7 +114,7 @@ pub fn number(window: &Window) -> Result<u32> {
|
|||||||
u32::try_from(number).context("window number out of range")
|
u32::try_from(number).context("window number out of range")
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Takes posted mouse moves; gpui's tracking area takes only real ones.
|
/// Takes posted mouse moves; a tracking area takes real ones.
|
||||||
#[cfg(target_os = "macos")]
|
#[cfg(target_os = "macos")]
|
||||||
fn take_posted_moves(window: &Window) -> Result<()> {
|
fn take_posted_moves(window: &Window) -> Result<()> {
|
||||||
use cocoa::{appkit::NSWindow, base::YES};
|
use cocoa::{appkit::NSWindow, base::YES};
|
||||||
|
|||||||
@@ -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)>;
|
type OnTurn = Rc<dyn Fn(f32, &mut Window, &mut App)>;
|
||||||
|
|
||||||
/// An svg turned clockwise by degrees, with a knob to drag.
|
/// An svg turned clockwise by degrees, with a knob.
|
||||||
#[derive(IntoElement)]
|
#[derive(IntoElement)]
|
||||||
pub struct Rotatable {
|
pub struct Rotatable {
|
||||||
id: ElementId,
|
id: ElementId,
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ fn nested() -> bool {
|
|||||||
LAYERS.with_borrow(|layers| !layers.is_empty())
|
LAYERS.with_borrow(|layers| !layers.is_empty())
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Draws `child` over the page; inside a raise, last within it.
|
/// Draws `child` over the page, last inside a raise.
|
||||||
pub fn raise(id: impl Into<ElementId>, child: impl IntoElement) -> Raised {
|
pub fn raise(id: impl Into<ElementId>, child: impl IntoElement) -> Raised {
|
||||||
let layer = Layer {
|
let layer = Layer {
|
||||||
child: child.into_any_element(),
|
child: child.into_any_element(),
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ fn offset(align: TextAlign, free: Pixels) -> Pixels {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// One line in the text style around it, cut by `fit` to its box and set by its alignment.
|
/// One line, cut by `fit` to its box and aligned.
|
||||||
fn cut_line(text: SharedString, fit: fn(&str, Pixels, &mut Window) -> String) -> Div {
|
fn cut_line(text: SharedString, fit: fn(&str, Pixels, &mut Window) -> String) -> Div {
|
||||||
let line = text.clone();
|
let line = text.clone();
|
||||||
div()
|
div()
|
||||||
|
|||||||
Reference in new issue
Block a user