print: Only show one size input for percent
This commit is contained in:
parent
d138750448
commit
2864eb7cc3
2 changed files with 12 additions and 2 deletions
|
|
@ -764,6 +764,16 @@ impl LpPrint {
|
||||||
|
|
||||||
fn on_size_unit_changed(&self) {
|
fn on_size_unit_changed(&self) {
|
||||||
let imp = self.imp();
|
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 _ui_updates_disabled = self.disable_ui_updates();
|
||||||
|
|
||||||
let (orig_width, orig_height) = self.original_size();
|
let (orig_width, orig_height) = self.original_size();
|
||||||
|
|
@ -792,6 +802,7 @@ impl LpPrint {
|
||||||
|
|
||||||
fn on_margin_unit_changed(&self) {
|
fn on_margin_unit_changed(&self) {
|
||||||
let imp = self.imp();
|
let imp = self.imp();
|
||||||
|
|
||||||
let _ui_updates_disabled = self.disable_ui_updates();
|
let _ui_updates_disabled = self.disable_ui_updates();
|
||||||
|
|
||||||
let unit = self.margin_unit();
|
let unit = self.margin_unit();
|
||||||
|
|
|
||||||
|
|
@ -166,7 +166,6 @@
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="AdwSpinRow" id="width">
|
<object class="AdwSpinRow" id="width">
|
||||||
<property name="title" translatable="yes">_Width</property>
|
|
||||||
<property name="use-underline">true</property>
|
<property name="use-underline">true</property>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue