print: Only show one size input for percent

This commit is contained in:
Sophie Herold 2023-12-22 21:42:37 +01:00
parent d138750448
commit 2864eb7cc3
2 changed files with 12 additions and 2 deletions

View file

@ -764,6 +764,16 @@ impl LpPrint {
fn on_size_unit_changed(&self) {
let imp = self.imp();
// Only show one size input for percentage
if matches!(self.size_unit(), Unit::Percent) {
imp.width.set_title(&gettext("_Scale"));
imp.height.set_visible(false);
} else {
imp.width.set_title(&gettext("_Width"));
imp.height.set_visible(true);
}
let _ui_updates_disabled = self.disable_ui_updates();
let (orig_width, orig_height) = self.original_size();
@ -792,6 +802,7 @@ impl LpPrint {
fn on_margin_unit_changed(&self) {
let imp = self.imp();
let _ui_updates_disabled = self.disable_ui_updates();
let unit = self.margin_unit();