Skip to content

Commit d6517b3

Browse files
committed
Add comments and solve warnings
1 parent d6b063c commit d6517b3

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

internal/compiler/builtins.slint

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ export component StyledText inherits Empty {
131131
in property <TextVerticalAlignment> vertical-alignment;
132132
callback link-clicked(link: string);
133133
in property <color> link-color: #00f;
134+
134135
in property <string> font-family;
135136
in property <bool> font-italic;
136137
in property <TextOverflow> overflow;

internal/compiler/passes/resolving.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -835,7 +835,7 @@ impl Expression {
835835
Expression::FunctionCall {
836836
function: BuiltinFunction::ParseMarkdown.into(),
837837
arguments: vec![
838-
expr.unwrap_or_else(|| Expression::default_value_for_type(&Type::String)),
838+
expr.unwrap_or_else(|| Expression::default_value_for_type(&Type::String))
839839
],
840840
source_location: Some(node.to_source_location()),
841841
}

internal/interpreter/api.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ use std::rc::Rc;
1919
#[doc(inline)]
2020
pub use i_slint_compiler::diagnostics::{Diagnostic, DiagnosticLevel};
2121
pub use i_slint_core::api::{
22-
self, ComponentHandle, EventLoopError, Global, JoinHandle, PlatformError, SharedString, Weak,
23-
Window,
22+
ComponentHandle, EventLoopError, Global, JoinHandle, PlatformError, SharedString, Weak, Window,
2423
};
2524
// keep in sync with api/rs/slint/lib.rs
2625
pub use i_slint_backend_selector::api::*;
26+
use i_slint_core::api;
2727
pub use i_slint_core::graphics::{
2828
Brush, Color, Image, LoadImageError, Rgb8Pixel, Rgba8Pixel, RgbaColor, SharedPixelBuffer,
2929
};
@@ -53,6 +53,7 @@ pub enum ValueType {
5353
Brush,
5454
/// Correspond to `image` type in .slint.
5555
Image,
56+
/// Correspond to `styled-text` type in .slint.
5657
StyledText,
5758
/// The type is not a public type but something internal.
5859
#[doc(hidden)]
@@ -78,6 +79,7 @@ impl From<LangType> for ValueType {
7879
LangType::Struct { .. } => Self::Struct,
7980
LangType::Void => Self::Void,
8081
LangType::Image => Self::Image,
82+
LangType::StyledText => Self::StyledText,
8183
_ => Self::Other,
8284
}
8385
}
@@ -131,6 +133,7 @@ pub enum Value {
131133
#[doc(hidden)]
132134
/// Correspond to the `component-factory` type in .slint
133135
ComponentFactory(ComponentFactory) = 12,
136+
/// Correspond to the `styled-text` type in .slint
134137
StyledText(api::StyledText) = 13,
135138
}
136139

0 commit comments

Comments
 (0)