Adding a "1:1" symbol in tool's titile that require a 1:1 preview to be seen (issue 2132)

This commit is contained in:
Hombre
2013-12-21 14:29:53 +01:00
parent f3c2ce6425
commit e4e66cfc49
23 changed files with 814 additions and 118 deletions

View File

@@ -57,3 +57,21 @@ void FoldableToolPanel::foldThemAll (GdkEventButton* event) {
(static_cast<ToolPanelCoordinator*>(tmp))->foldAllButOne( parentContainer, this);
}
}
void FoldableToolPanel::setLabel (Glib::ustring label, bool need100Percent) {
if (!need100Percent)
exp->set_label(Glib::ustring("<b>") + label + Glib::ustring("</b>"));
else {
Gtk::Label *labelWidget = Gtk::manage (new Gtk::Label(Glib::ustring("<b>") + label + Glib::ustring("</b>")));
labelWidget->set_use_markup();
RTImage *image = Gtk::manage (new RTImage("zoom-100-identifier.png"));
image->set_tooltip_text(M("TP_GENERAL_11SCALE_TOOLTIP"));
Gtk::HBox *hbox = Gtk::manage (new Gtk::HBox());
hbox->set_spacing(4);
hbox->pack_start(*labelWidget, false, false, 0);
hbox->pack_end(*image, false, false, 0);
exp->set_label_widget(*hbox);
exp->set_label_fill();
}
}