Navigator info fonts (issue 2333)

This commit is contained in:
michael
2014-04-11 12:50:02 -04:00
parent f372928f0a
commit afbf5463c8
2 changed files with 38 additions and 23 deletions

View File

@@ -599,8 +599,8 @@ NAVIGATOR_NA; --
NAVIGATOR_R;R: NAVIGATOR_R;R:
NAVIGATOR_S;S: NAVIGATOR_S;S:
NAVIGATOR_V;V: NAVIGATOR_V;V:
NAVIGATOR_XY_FULL;Width = %1, Height = %2 NAVIGATOR_XY_FULL;Width: %1, Height: %2
NAVIGATOR_XY_NA;x = n/a, y = n/a NAVIGATOR_XY_NA;x: --, y: --
OPTIONS_DEFIMG_MISSING;The default profile for <b>non-raw photos</b> could not be found or is not set.\n\nPlease check your profiles' directory, it may be missing or damaged.\n\nDefault internal values will be used. OPTIONS_DEFIMG_MISSING;The default profile for <b>non-raw photos</b> could not be found or is not set.\n\nPlease check your profiles' directory, it may be missing or damaged.\n\nDefault internal values will be used.
OPTIONS_DEFRAW_MISSING;The default profile for <b>raw photos</b> could not be found or is not set.\n\nPlease check your profiles' directory, it may be missing or damaged.\n\nDefault internal values will be used. OPTIONS_DEFRAW_MISSING;The default profile for <b>raw photos</b> could not be found or is not set.\n\nPlease check your profiles' directory, it may be missing or damaged.\n\nDefault internal values will be used.
PARTIALPASTE_BASICGROUP;Basic Settings PARTIALPASTE_BASICGROUP;Basic Settings

View File

@@ -81,28 +81,43 @@ Navigator::Navigator () {
LAB_L->set_alignment(Gtk::ALIGN_RIGHT); LAB_L->set_alignment(Gtk::ALIGN_RIGHT);
// set font family and size // set font family and size
/* R->modify_font(Pango::FontDescription("monospace 8")); Glib::ustring fontname;
G->modify_font(Pango::FontDescription("monospace 8"));
B->modify_font(Pango::FontDescription("monospace 8"));
H->modify_font(Pango::FontDescription("monospace 8"));
S->modify_font(Pango::FontDescription("monospace 8"));
V->modify_font(Pango::FontDescription("monospace 8"));
LAB_A->modify_font(Pango::FontDescription("monospace 8"));
LAB_B->modify_font(Pango::FontDescription("monospace 8"));
LAB_L->modify_font(Pango::FontDescription("monospace 8"));
lR->modify_font(Pango::FontDescription("monospace 8")); #ifdef WIN32
lG->modify_font(Pango::FontDescription("monospace 8")); fontname = "Lucida Sans Typewriter";
lB->modify_font(Pango::FontDescription("monospace 8")); #endif
lH->modify_font(Pango::FontDescription("monospace 8"));
lS->modify_font(Pango::FontDescription("monospace 8"));
lV->modify_font(Pango::FontDescription("monospace 8"));
lLAB_A->modify_font(Pango::FontDescription("monospace 8"));
lLAB_B->modify_font(Pango::FontDescription("monospace 8"));
lLAB_L->modify_font(Pango::FontDescription("monospace 8"));
position->modify_font(Pango::FontDescription("monospace 8")); #ifdef __linux__
*/ fontname = "DejaVu Sans Mono";
#endif
#ifdef __APPLE__
fontname="Menlo";
#endif
if (fontname!=""){
R->modify_font(Pango::FontDescription(fontname));
G->modify_font(Pango::FontDescription(fontname));
B->modify_font(Pango::FontDescription(fontname));
H->modify_font(Pango::FontDescription(fontname));
S->modify_font(Pango::FontDescription(fontname));
V->modify_font(Pango::FontDescription(fontname));
LAB_A->modify_font(Pango::FontDescription(fontname));
LAB_B->modify_font(Pango::FontDescription(fontname));
LAB_L->modify_font(Pango::FontDescription(fontname));
lR->modify_font(Pango::FontDescription(fontname));
lG->modify_font(Pango::FontDescription(fontname));
lB->modify_font(Pango::FontDescription(fontname));
lH->modify_font(Pango::FontDescription(fontname));
lS->modify_font(Pango::FontDescription(fontname));
lV->modify_font(Pango::FontDescription(fontname));
lLAB_A->modify_font(Pango::FontDescription(fontname));
lLAB_B->modify_font(Pango::FontDescription(fontname));
lLAB_L->modify_font(Pango::FontDescription(fontname));
position->modify_font(Pango::FontDescription(fontname));
}
// setup the tables // setup the tables
Gtk::Table* table0 = Gtk::manage (new Gtk::Table (1, 3)); //rows, cols The main table container Gtk::Table* table0 = Gtk::manage (new Gtk::Table (1, 3)); //rows, cols The main table container
@@ -192,7 +207,7 @@ void Navigator::pointerMoved (bool validPos, Glib::ustring profile, int x, int y
if (!validPos) if (!validPos)
setInvalid (x,y); setInvalid (x,y);
else { else {
position->set_text (Glib::ustring::compose ("x = %1, y = %2", x, y)); position->set_text (Glib::ustring::compose ("x: %1, y: %2", x, y));
R->set_text (Glib::ustring::format(std::fixed, std::setprecision(1), r*100.f/255.f) + Glib::ustring("%")); R->set_text (Glib::ustring::format(std::fixed, std::setprecision(1), r*100.f/255.f) + Glib::ustring("%"));
G->set_text (Glib::ustring::format(std::fixed, std::setprecision(1), g*100.f/255.f) + Glib::ustring("%")); G->set_text (Glib::ustring::format(std::fixed, std::setprecision(1), g*100.f/255.f) + Glib::ustring("%"));