Crop Editing layout fixed

Preferences > Image Processing > Crop Edit was vertically centered with
large empty gaps above and below the frame. Now it starts as soon as the
frame above ends.
This commit is contained in:
Morgan Hardwood 2018-11-21 01:50:44 +01:00
parent add3d51719
commit 8b4027d75d
2 changed files with 23 additions and 25 deletions

View File

@ -599,27 +599,25 @@ Gtk::Widget* Preferences::getImageProcessingPanel ()
vbImageProcessing->pack_start (*cdf, Gtk::PACK_SHRINK, 4 ); vbImageProcessing->pack_start (*cdf, Gtk::PACK_SHRINK, 4 );
// Crop // Crop
Gtk::Frame *cropframe = Gtk::manage(new Gtk::Frame(M("PREFERENCES_CROP"))); Gtk::Frame *cropFrame = Gtk::manage(new Gtk::Frame(M("PREFERENCES_CROP")));
Gtk::VBox *cropvb = Gtk::manage(new Gtk::VBox()); Gtk::Grid *cropGrid = Gtk::manage(new Gtk::Grid());
Gtk::HBox *crophb = Gtk::manage(new Gtk::HBox()); Gtk::Label *cropGuidesLbl = Gtk::manage(new Gtk::Label(M("PREFERENCES_CROP_GUIDES") + ": "));
cropGuides = Gtk::manage(new Gtk::ComboBoxText()); cropGuidesCombo = Gtk::manage(new Gtk::ComboBoxText());
cropGuides->append(M("PREFERENCES_CROP_GUIDES_NONE")); cropGuidesCombo->append(M("PREFERENCES_CROP_GUIDES_NONE"));
cropGuides->append(M("PREFERENCES_CROP_GUIDES_FRAME")); cropGuidesCombo->append(M("PREFERENCES_CROP_GUIDES_FRAME"));
cropGuides->append(M("PREFERENCES_CROP_GUIDES_FULL")); cropGuidesCombo->append(M("PREFERENCES_CROP_GUIDES_FULL"));
crophb->pack_start(*Gtk::manage(new Gtk::Label(M("PREFERENCES_CROP_GUIDES") + ": ")), Gtk::PACK_SHRINK, 4); cropAutoFitCB = Gtk::manage(new Gtk::CheckButton());
crophb->pack_start(*cropGuides); Gtk::Label *cropAutoFitLbl = Gtk::manage(new Gtk::Label(M("PREFERENCES_CROP_AUTO_FIT")));
cropvb->pack_start(*crophb); cropAutoFitLbl->set_line_wrap(true);
Gtk::Label *cropAutoFitLabel = Gtk::manage(new Gtk::Label(M("PREFERENCES_CROP_AUTO_FIT"))); cropAutoFitCB->add(*cropAutoFitLbl);
cropAutoFitLabel->set_line_wrap(true); cropGrid->attach(*cropGuidesLbl, 0, 0, 1, 1);
setExpandAlignProperties(cropAutoFitLabel, false, false, Gtk::ALIGN_START, Gtk::ALIGN_START); cropGrid->attach(*cropGuidesCombo, 1, 0, 1, 1);
cropAutoFit = Gtk::manage(new Gtk::CheckButton()); cropGrid->attach(*cropAutoFitCB, 0, 1, 2, 1);
setExpandAlignProperties(cropAutoFit, false, true, Gtk::ALIGN_START, Gtk::ALIGN_START); cropFrame->add(*cropGrid);
cropAutoFit->add(*cropAutoFitLabel); vbImageProcessing->pack_start(*cropFrame, Gtk::PACK_SHRINK, 4);
cropvb->pack_start(*cropAutoFit);
cropframe->add(*cropvb);
vbImageProcessing->pack_start(*cropframe, Gtk::PACK_SHRINK, 4);
swImageProcessing->add(*vbImageProcessing); swImageProcessing->add(*vbImageProcessing);
return swImageProcessing; return swImageProcessing;
} }
@ -1798,8 +1796,8 @@ void Preferences::storePreferences ()
moptions.sndLngEditProcDoneSecs = spbSndLngEditProcDoneSecs->get_value (); moptions.sndLngEditProcDoneSecs = spbSndLngEditProcDoneSecs->get_value ();
#endif #endif
moptions.cropGuides = Options::CropGuidesMode(cropGuides->get_active_row_number()); moptions.cropGuides = Options::CropGuidesMode(cropGuidesCombo->get_active_row_number());
moptions.cropAutoFit = cropAutoFit->get_active(); moptions.cropAutoFit = cropAutoFitCB->get_active();
} }
void Preferences::fillPreferences () void Preferences::fillPreferences ()
@ -2015,8 +2013,8 @@ void Preferences::fillPreferences ()
} }
} }
cropGuides->set_active(moptions.cropGuides); cropGuidesCombo->set_active(moptions.cropGuides);
cropAutoFit->set_active(moptions.cropAutoFit); cropAutoFitCB->set_active(moptions.cropAutoFit);
addc.block (false); addc.block (false);
setc.block (false); setc.block (false);

View File

@ -200,8 +200,8 @@ class Preferences : public Gtk::Dialog, public ProfileStoreListener
DynamicProfilePanel *dynProfilePanel; DynamicProfilePanel *dynProfilePanel;
Gtk::ComboBoxText *cropGuides; Gtk::ComboBoxText *cropGuidesCombo;
Gtk::CheckButton *cropAutoFit; Gtk::CheckButton *cropAutoFitCB;
Glib::ustring storedValueRaw; Glib::ustring storedValueRaw;
Glib::ustring storedValueImg; Glib::ustring storedValueImg;