Make WB-Picker button look like other toolbuttons (#4967)
This commit is contained in:
@@ -149,17 +149,19 @@ static double wbTemp2Slider(double temp)
|
||||
|
||||
WhiteBalance::WhiteBalance () : FoldableToolPanel(this, "whitebalance", M("TP_WBALANCE_LABEL"), false, true), wbp(nullptr), wblistener(nullptr)
|
||||
{
|
||||
|
||||
Gtk::HBox* hbox = Gtk::manage (new Gtk::HBox ());
|
||||
hbox->set_spacing(4);
|
||||
hbox->show ();
|
||||
Gtk::Label* lab = Gtk::manage (new Gtk::Label (M("TP_WBALANCE_METHOD")));
|
||||
lab->show ();
|
||||
|
||||
Gtk::Grid* methodgrid = Gtk::manage(new Gtk::Grid());
|
||||
methodgrid->get_style_context()->add_class("grid-spacing");
|
||||
setExpandAlignProperties(methodgrid, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER);
|
||||
|
||||
Gtk::Label* lab = Gtk::manage (new Gtk::Label (M("TP_WBALANCE_METHOD") + ":"));
|
||||
setExpandAlignProperties(lab, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER);
|
||||
|
||||
// Create the Tree model
|
||||
refTreeModel = Gtk::TreeStore::create(methodColumns);
|
||||
// Create the Combobox
|
||||
method = Gtk::manage (new MyComboBox ());
|
||||
setExpandAlignProperties(method, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER);
|
||||
// Assign the model to the Combobox
|
||||
method->set_model(refTreeModel);
|
||||
|
||||
@@ -244,31 +246,30 @@ WhiteBalance::WhiteBalance () : FoldableToolPanel(this, "whitebalance", M("TP_WB
|
||||
cellRenderer->property_ellipsize() = Pango::ELLIPSIZE_MIDDLE;
|
||||
|
||||
method->set_active (0); // Camera
|
||||
method->show ();
|
||||
hbox->pack_start (*lab, Gtk::PACK_SHRINK, 0);
|
||||
hbox->pack_start (*method);
|
||||
pack_start (*hbox, Gtk::PACK_SHRINK, 0);
|
||||
methodgrid->attach (*lab, 0, 0, 1, 1);
|
||||
methodgrid->attach (*method, 1, 0, 1, 1);
|
||||
pack_start (*methodgrid, Gtk::PACK_SHRINK, 0 );
|
||||
opt = 0;
|
||||
|
||||
Gtk::HBox* spotbox = Gtk::manage (new Gtk::HBox ());
|
||||
spotbox->set_spacing(4);
|
||||
spotbox->show ();
|
||||
Gtk::Grid* spotgrid = Gtk::manage(new Gtk::Grid());
|
||||
spotgrid->get_style_context()->add_class("grid-spacing");
|
||||
setExpandAlignProperties(spotgrid, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER);
|
||||
|
||||
spotbutton = Gtk::manage (new Gtk::Button ());
|
||||
spotbutton = Gtk::manage (new Gtk::Button (M("TP_WBALANCE_PICKER")));
|
||||
setExpandAlignProperties(spotbutton, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER);
|
||||
spotbutton->get_style_context()->add_class("independent");
|
||||
spotbutton->set_tooltip_text(M("TP_WBALANCE_SPOTWB"));
|
||||
Gtk::Image* spotimg = Gtk::manage (new RTImage ("color-picker.png"));
|
||||
spotimg->show ();
|
||||
spotbutton->set_image (*spotimg);
|
||||
spotbutton->show ();
|
||||
|
||||
spotbox->pack_start (*spotbutton);
|
||||
spotbutton->set_image (*Gtk::manage (new RTImage ("color-picker-small.png")));
|
||||
|
||||
Gtk::Label* slab = Gtk::manage (new Gtk::Label (M("TP_WBALANCE_SIZE")));
|
||||
slab->show ();
|
||||
setExpandAlignProperties(slab, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER);
|
||||
|
||||
Gtk::Grid* wbsizehelper = Gtk::manage(new Gtk::Grid());
|
||||
wbsizehelper->set_name("WB-Size-Helper");
|
||||
setExpandAlignProperties(wbsizehelper, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER);
|
||||
|
||||
spotsize = Gtk::manage (new MyComboBoxText ());
|
||||
spotsize->show ();
|
||||
setExpandAlignProperties(spotsize, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER);
|
||||
spotsize->append ("2");
|
||||
|
||||
if (options.whiteBalanceSpotSize == 2) {
|
||||
@@ -298,11 +299,17 @@ WhiteBalance::WhiteBalance () : FoldableToolPanel(this, "whitebalance", M("TP_WB
|
||||
if (options.whiteBalanceSpotSize == 32) {
|
||||
spotsize->set_active(4);
|
||||
}
|
||||
|
||||
wbsizehelper->attach (*spotsize, 0, 0, 1, 1);
|
||||
|
||||
spotbox->pack_end (*spotsize, Gtk::PACK_EXPAND_WIDGET, 0);
|
||||
spotbox->pack_end (*slab, Gtk::PACK_SHRINK, 0);
|
||||
|
||||
pack_start (*spotbox, Gtk::PACK_SHRINK, 0);
|
||||
spotgrid->attach (*spotbutton, 0, 0, 1, 1);
|
||||
spotgrid->attach (*slab, 1, 0, 1, 1);
|
||||
spotgrid->attach (*wbsizehelper, 2, 0, 1, 1);
|
||||
pack_start (*spotgrid, Gtk::PACK_SHRINK, 0 );
|
||||
|
||||
Gtk::HSeparator *separator = Gtk::manage (new Gtk::HSeparator());
|
||||
separator->get_style_context()->add_class("grid-row-separator");
|
||||
pack_start (*separator, Gtk::PACK_SHRINK, 0);
|
||||
|
||||
Gtk::Image* itempL = Gtk::manage (new RTImage ("circle-blue-small.png"));
|
||||
Gtk::Image* itempR = Gtk::manage (new RTImage ("circle-yellow-small.png"));
|
||||
|
Reference in New Issue
Block a user