1
0
mirror of https://github.com/ciromattia/kcc synced 2025-12-30 18:11:49 +00:00

Add preserve margin % toggle (#886)

* preserve margin

* set ratio to 0.5

* add preserve margin GUI

* increase step size to 5

* remove clear

* fix save

* save preserveMarginBox

* math

* max 99
This commit is contained in:
Alex Xu
2025-04-03 10:11:14 -07:00
committed by GitHub
parent 41f87273ca
commit 3e3710dd76
7 changed files with 103 additions and 41 deletions

View File

@@ -330,7 +330,7 @@
<property name="visible">
<bool>false</bool>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<layout class="QGridLayout" name="gridLayout_5">
<property name="leftMargin">
<number>0</number>
</property>
@@ -343,14 +343,24 @@
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<item row="1" column="0">
<widget class="QLabel" name="preserveMarginLabel">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;After calculating the cropping boundaries, &amp;quot;back up&amp;quot; a specified percentage amount.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Preserve Margin %</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="croppingPowerLabel">
<property name="text">
<string>Cropping power:</string>
</property>
</widget>
</item>
<item>
<item row="0" column="1">
<widget class="QSlider" name="croppingPowerSlider">
<property name="maximum">
<number>300</number>
@@ -363,6 +373,25 @@
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QSpinBox" name="preserveMarginBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximum">
<number>99</number>
</property>
<property name="singleStep">
<number>5</number>
</property>
<property name="value">
<number>0</number>
</property>
</widget>
</item>
</layout>
</widget>
</item>