process_list::View done
This commit is contained in:
@@ -443,7 +443,7 @@ pub fn construct(ess: &mut ConstructEssentials, params: Params) -> anyhow::Resul
|
||||
if let Some(sprite_path) = params.sprite_src {
|
||||
let sprite = WidgetSprite::create(WidgetSpriteParams {
|
||||
glyph_data: Some(CustomGlyphData::new(CustomGlyphContent::from_assets(
|
||||
&mut globals,
|
||||
&globals,
|
||||
sprite_path,
|
||||
)?)),
|
||||
..Default::default()
|
||||
@@ -457,7 +457,7 @@ pub fn construct(ess: &mut ConstructEssentials, params: Params) -> anyhow::Resul
|
||||
width: length(20.0),
|
||||
height: length(20.0),
|
||||
},
|
||||
margin: default_margin.clone(),
|
||||
margin: default_margin,
|
||||
..Default::default()
|
||||
},
|
||||
)?;
|
||||
|
||||
@@ -32,7 +32,7 @@ pub fn parse_widget_sprite<'a>(
|
||||
};
|
||||
|
||||
if !value.is_empty() {
|
||||
glyph = match CustomGlyphContent::from_assets(&mut ctx.layout.state.globals, asset_path) {
|
||||
glyph = match CustomGlyphContent::from_assets(&ctx.layout.state.globals, asset_path) {
|
||||
Ok(glyph) => Some(glyph),
|
||||
Err(e) => {
|
||||
log::warn!("failed to load {value}: {e}");
|
||||
|
||||
@@ -38,7 +38,7 @@ impl CustomGlyphContent {
|
||||
}
|
||||
|
||||
#[allow(clippy::case_sensitive_file_extension_comparisons)]
|
||||
pub fn from_assets(globals: &mut WguiGlobals, path: AssetPath) -> anyhow::Result<Self> {
|
||||
pub fn from_assets(globals: &WguiGlobals, path: AssetPath) -> anyhow::Result<Self> {
|
||||
let path_str = path.get_str();
|
||||
let data = globals.get_asset(path)?;
|
||||
if path_str.ends_with(".svg") || path_str.ends_with(".svgz") {
|
||||
|
||||
Reference in New Issue
Block a user