mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-26 02:09:00 +00:00
Save for Web's Image Size and the PDF export headings are quiet section labels, as they were
This commit is contained in:
@@ -10,7 +10,7 @@ use crate::layout_components::Stack;
|
||||
use crate::notices::{Notice, NoticeLayout};
|
||||
use crate::pickers::Select;
|
||||
use crate::runtime::env::{Label, UnitKind, Units};
|
||||
use crate::sections::Section;
|
||||
use crate::sections::{HeaderStrength, Section};
|
||||
use crate::style::TypeRole;
|
||||
use crate::text::{NumberField, TextField};
|
||||
use craft_behavior::Mixed;
|
||||
@@ -322,7 +322,7 @@ impl Sections<'_> {
|
||||
value_row(ui, "compatibility", &words.compatibility, &compatibility);
|
||||
value_row(ui, "encryption", &words.encryption, &encryption);
|
||||
});
|
||||
Section::fixed(words.summary_changes.clone()).id_salt("changes").show(ui, |ui, _| {
|
||||
Section::fixed(words.summary_changes.clone()).strength(HeaderStrength::Caption).id_salt("changes").show(ui, |ui, _| {
|
||||
Stack::new().show(ui, |ui, _| {
|
||||
for line in self.changed {
|
||||
Text::new(Label::from(line.clone())).show(ui);
|
||||
@@ -332,7 +332,7 @@ impl Sections<'_> {
|
||||
}
|
||||
});
|
||||
});
|
||||
Section::fixed(words.summary_warnings.clone()).id_salt("warnings").show(ui, |ui, _| {
|
||||
Section::fixed(words.summary_warnings.clone()).strength(HeaderStrength::Caption).id_salt("warnings").show(ui, |ui, _| {
|
||||
Stack::new().show(ui, |ui, _| {
|
||||
if self.warnings.is_empty() {
|
||||
note(ui, &words.no_warnings);
|
||||
@@ -362,9 +362,9 @@ fn resample_rows(ui: &mut Ui, words: &PdfExportWords, downsample: &mut craft_pdf
|
||||
}
|
||||
}
|
||||
|
||||
/// A titled group of rows: a section whose body is one field group.
|
||||
/// A titled group of rows: a section under a quiet heading whose body is one field group.
|
||||
fn group(ui: &mut Ui, id: &'static str, title: &Label, mut rows: impl FnMut(&mut Ui)) {
|
||||
Section::fixed(title.clone()).id_salt(id).show(ui, |ui, _| {
|
||||
Section::fixed(title.clone()).strength(HeaderStrength::Caption).id_salt(id).show(ui, |ui, _| {
|
||||
FieldGroup::new(title.clone()).show(ui, |ui, _| rows(ui));
|
||||
});
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ use crate::pickers::{Select, UnitSelect};
|
||||
|
||||
use crate::runtime::env::{Label, UnitKind, Units};
|
||||
|
||||
use crate::sections::Section;
|
||||
use crate::sections::{HeaderStrength, Section};
|
||||
use crate::text::{HexField, NumberField};
|
||||
|
||||
use craft_behavior::NumberCodec;
|
||||
@@ -257,7 +257,7 @@ fn size_section(ui: &mut Ui, words: &SaveForWebWords, sizing: &SizingWords, unit
|
||||
Entry::new(UnitKind::Pixels, Label::from(units.symbol(UnitKind::Pixels))),
|
||||
Entry::new(UnitKind::Percent, Label::from(units.symbol(UnitKind::Percent))),
|
||||
];
|
||||
Section::fixed(words.image_size.clone()).id_salt("size").show(ui, |ui, _| {
|
||||
Section::fixed(words.image_size.clone()).strength(HeaderStrength::Caption).id_salt("size").show(ui, |ui, _| {
|
||||
row(ui, &words.width, "width", |ui| {
|
||||
let range = link.width_range();
|
||||
let field = UnitSelect::new(words.width.clone(), Bind::given(Some(link.width())), Bind::given(link.unit()), &kinds)
|
||||
|
||||
Reference in New Issue
Block a user