Removed unnecesarry references
This commit is contained in:
@@ -1927,14 +1927,12 @@ void BackBuffer::copySurface(Cairo::RefPtr<Cairo::Context> crDest, Gdk::Rectangl
|
||||
SpotPicker::SpotPicker(int const defaultValue, Glib::ustring const &buttonKey, Glib::ustring const &buttonTooltip, Glib::ustring const &labelKey) :
|
||||
Gtk::Grid(),
|
||||
_associatedVar(defaultValue),
|
||||
_spotLabel(Gtk::manage(new Gtk::Label(M(labelKey)))),
|
||||
_spotSizeSetter(Gtk::manage(selecterSetup())),
|
||||
_spotButton(Gtk::manage(spotButtonTemplate(buttonKey, buttonTooltip)))
|
||||
_spotLabel(labelSetup(labelKey)),
|
||||
_spotSizeSetter(new MyComboBoxText(selecterSetup())),
|
||||
_spotButton(spotButtonTemplate(buttonKey, buttonTooltip))
|
||||
|
||||
{
|
||||
setExpandAlignProperties(_spotLabel, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER);
|
||||
|
||||
Gtk::Grid* spotSizeHelper(Gtk::manage(new Gtk::Grid()));
|
||||
Gtk::Grid* spotSizeHelper = new Gtk::Grid();
|
||||
spotSizeHelper->set_name("Spot-Size-Helper");
|
||||
setExpandAlignProperties(spotSizeHelper, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER);
|
||||
|
||||
@@ -1943,59 +1941,66 @@ SpotPicker::SpotPicker(int const defaultValue, Glib::ustring const &buttonKey, G
|
||||
|
||||
spotSizeHelper->attach (*_spotSizeSetter, 0, 0, 1, 1);
|
||||
|
||||
this->attach (*_spotButton, 0, 0, 1, 1);
|
||||
this->attach (*_spotLabel, 1, 0, 1, 1);
|
||||
this->attach (_spotButton, 0, 0, 1, 1);
|
||||
this->attach (_spotLabel, 1, 0, 1, 1);
|
||||
this->attach (*spotSizeHelper, 2, 0, 1, 1);
|
||||
_spotSizeSetter->signal_changed().connect( sigc::mem_fun(*this, &SpotPicker::spotSizeChanged));
|
||||
}
|
||||
SpotPicker::~SpotPicker()
|
||||
{
|
||||
|
||||
delete _spotSizeSetter;
|
||||
}
|
||||
|
||||
MyComboBoxText* SpotPicker::selecterSetup()
|
||||
Gtk::Label SpotPicker::labelSetup(Glib::ustring const &key)
|
||||
{
|
||||
MyComboBoxText* spotSize(new MyComboBoxText ());
|
||||
setExpandAlignProperties(spotSize, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER);
|
||||
Gtk::Label label(key);
|
||||
setExpandAlignProperties(&label, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER);
|
||||
return label;
|
||||
}
|
||||
|
||||
spotSize->append ("2");
|
||||
MyComboBoxText SpotPicker::selecterSetup()
|
||||
{
|
||||
MyComboBoxText spotSize = MyComboBoxText();
|
||||
setExpandAlignProperties(&spotSize, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER);
|
||||
|
||||
spotSize.append ("2");
|
||||
if (_associatedVar == 2) {
|
||||
spotSize->set_active(0);
|
||||
spotSize.set_active(0);
|
||||
}
|
||||
|
||||
spotSize->append ("4");
|
||||
spotSize.append ("4");
|
||||
|
||||
if (_associatedVar == 4) {
|
||||
spotSize->set_active(1);
|
||||
spotSize.set_active(1);
|
||||
}
|
||||
|
||||
spotSize->append ("8");
|
||||
spotSize.append ("8");
|
||||
|
||||
if (_associatedVar == 8) {
|
||||
spotSize->set_active(2);
|
||||
spotSize.set_active(2);
|
||||
}
|
||||
|
||||
spotSize->append ("16");
|
||||
spotSize.append ("16");
|
||||
|
||||
if (_associatedVar == 16) {
|
||||
spotSize->set_active(3);
|
||||
spotSize.set_active(3);
|
||||
}
|
||||
|
||||
spotSize->append ("32");
|
||||
spotSize.append ("32");
|
||||
|
||||
if (_associatedVar == 32) {
|
||||
spotSize->set_active(4);
|
||||
spotSize.set_active(4);
|
||||
}
|
||||
return spotSize;
|
||||
}
|
||||
|
||||
Gtk::ToggleButton* SpotPicker::spotButtonTemplate(Glib::ustring const &key, const Glib::ustring &tooltip)
|
||||
Gtk::ToggleButton SpotPicker::spotButtonTemplate(Glib::ustring const &key, const Glib::ustring &tooltip)
|
||||
{
|
||||
Gtk::ToggleButton *spotButton(new Gtk::ToggleButton(key));
|
||||
setExpandAlignProperties(spotButton, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER);
|
||||
spotButton->get_style_context()->add_class("independent");
|
||||
spotButton->set_tooltip_text(tooltip);
|
||||
spotButton->set_image(*Gtk::manage(new RTImage("color-picker-small.png")));
|
||||
Gtk::ToggleButton spotButton = Gtk::ToggleButton(key);
|
||||
setExpandAlignProperties(&spotButton, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER);
|
||||
spotButton.get_style_context()->add_class("independent");
|
||||
spotButton.set_tooltip_text(tooltip);
|
||||
spotButton.set_image(*Gtk::manage(new RTImage("color-picker-small.png")));
|
||||
return spotButton;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user