mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-29 01:18:11 +08:00
Organize the categories of widget component props
This commit is contained in:
@@ -29,14 +29,14 @@ impl LayoutHolder for LicensesThirdPartyDialog {
|
||||
};
|
||||
|
||||
// Two characters (one before, one after) the sequence of underscore characters, plus one additional column to provide a space between the text and the scrollbar
|
||||
let non_wrapping_column_width = license_text.split('\n').map(|line| line.chars().filter(|&c| c == '_').count()).max().unwrap_or(0) + 2 + 1;
|
||||
let non_wrapping_column_width = license_text.split('\n').map(|line| line.chars().filter(|&c| c == '_').count() as u32).max().unwrap_or(0) + 2 + 1;
|
||||
|
||||
Layout(vec![LayoutGroup::Row {
|
||||
widgets: vec![
|
||||
TextLabel::new(license_text)
|
||||
.monospace(true)
|
||||
.multiline(true)
|
||||
.min_width(format!("{non_wrapping_column_width}ch"))
|
||||
.min_width_characters(non_wrapping_column_width)
|
||||
.widget_instance(),
|
||||
],
|
||||
}])
|
||||
|
||||
Reference in New Issue
Block a user