From 59e2eb04e9453fa18e991b205d54abd6a17b225a Mon Sep 17 00:00:00 2001 From: TooWaBoo Date: Sun, 16 Dec 2018 14:08:13 +0100 Subject: [PATCH] crop tool, fix Gui glitch & replace box with grid --- rtgui/crop.cc | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/rtgui/crop.cc b/rtgui/crop.cc index a06965840..1ba3171bc 100644 --- a/rtgui/crop.cc +++ b/rtgui/crop.cc @@ -181,6 +181,10 @@ Crop::Crop(): fixr = Gtk::manage (new Gtk::CheckButton (M("TP_CROP_FIXRATIO"))); setExpandAlignProperties(fixr, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); fixr->set_active (1); + + Gtk::Grid* ratiogrid = Gtk::manage(new Gtk::Grid()); + ratiogrid->get_style_context()->add_class("grid-spacing"); + setExpandAlignProperties(ratiogrid, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); ratio = Gtk::manage (new MyComboBoxText ()); setExpandAlignProperties(ratio, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); @@ -188,24 +192,25 @@ Crop::Crop(): orientation = Gtk::manage (new MyComboBoxText ()); setExpandAlignProperties(orientation, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); + customRatioLabel = Gtk::manage(new Gtk::Label("")); + customRatioLabel->hide(); + setExpandAlignProperties(customRatioLabel, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER); + + ratiogrid->set_column_homogeneous (true); + ratiogrid->attach (*ratio, 0, 0, 1, 1); + ratiogrid->attach (*customRatioLabel, 1, 0, 1, 1); + ratiogrid->attach (*orientation, 1, 0, 1, 1); + Gtk::Label* guidelab = Gtk::manage (new Gtk::Label (M("TP_CROP_GUIDETYPE"))); setExpandAlignProperties(guidelab, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); guide = Gtk::manage (new MyComboBoxText ()); setExpandAlignProperties(guide, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); - customRatioLabel = Gtk::manage(new Gtk::Label("")); - customRatioLabel->hide(); - Gtk::HBox *hb = Gtk::manage(new Gtk::HBox()); - hb->pack_start(*orientation); - hb->pack_start(*customRatioLabel); - - settingsgrid->set_column_homogeneous(true); settingsgrid->attach (*fixr, 0, 0, 1, 1); - settingsgrid->attach (*ratio, 1, 0, 1, 1); - settingsgrid->attach (*hb, 2, 0, 1, 1); + settingsgrid->attach (*ratiogrid, 1, 0, 1, 1); settingsgrid->attach (*guidelab, 0, 1, 1, 1); - settingsgrid->attach (*guide, 1, 1, 2, 1); + settingsgrid->attach (*guide, 1, 1, 1, 1); pack_start (*settingsgrid, Gtk::PACK_SHRINK, 0 );