Add resizing options "long edge" and "short edge" (#6263)

Introduces "long edge" and "short edge" options to resize an image. The GUI is made such that the relevant spinboxes only appear for the selected option. Unrelated values (e.g. for box-mode) are not updated.
This commit is contained in:
Bezierr
2021-06-05 05:37:09 +00:00
committed by GitHub
parent 38ff2b5695
commit d86888e93f
13 changed files with 311 additions and 28 deletions

View File

@@ -48,6 +48,8 @@ public:
void adjusterChanged (Adjuster* a, double newval) override;
void entryWChanged ();
void entryHChanged ();
void entryLEChanged ();
void entrySEChanged ();
void appliesToChanged ();
void methodChanged ();
void specChanged ();
@@ -62,25 +64,29 @@ public:
private:
void fitBoxScale ();
int getComputedWidth ();
int getComputedHeight ();
int getComputedWidth (double height);
int getComputedHeight (double width);
void notifyBBox ();
void updateGUI ();
void allowUpscalingChanged();
rtengine::ProcEvent EvResizeAllowUpscaling;
rtengine::ProcEvent EvResizeLongedge;
rtengine::ProcEvent EvResizeShortedge;
Adjuster* scale;
Gtk::Box* sizeBox;
Gtk::Box* sizeBox;
MyComboBoxText* appliesTo;
MyComboBoxText* method;
MyComboBoxText* spec;
MySpinButton* w;
MySpinButton* h;
MySpinButton* le;
MySpinButton* se;
Gtk::CheckButton *allowUpscaling;
int maxw, maxh;
int cropw, croph;
sigc::connection sconn, aconn, wconn, hconn;
bool wDirty, hDirty;
sigc::connection sconn, aconn, wconn, hconn, leconn, seconn;
bool wDirty, hDirty, leDirty, seDirty;
ToolParamBlock* packBox;
IdleRegister idle_register;