diff --git a/src/logbook/logbook.cxx b/src/logbook/logbook.cxx index 81557eab..c4f48556 100644 --- a/src/logbook/logbook.cxx +++ b/src/logbook/logbook.cxx @@ -32,7 +32,9 @@ void start_logbook () logbook_filename = progdefaults.logbookfilename; adifFile.readFile (logbook_filename.c_str(), &qsodb); - dlgLogbook->copy_label(fl_filename_name(logbook_filename.c_str())); + string label = "Logbook - "; + label.append(fl_filename_name(logbook_filename.c_str())); + dlgLogbook->copy_label(label.c_str()); loadBrowser(); qsodb.isdirty(0); diff --git a/src/logbook/table.cxx b/src/logbook/table.cxx index c9f9294d..26aa5a19 100644 --- a/src/logbook/table.cxx +++ b/src/logbook/table.cxx @@ -109,28 +109,34 @@ void Table::drawRow(int row, char *rowData[], int x, int y) { // Draw background box. if (row != selected) { Fl_Color bg; - if (!withGrid && row % 2 == 0) { // different bg for consecutive rows + if (!withGrid && row % 2 == 0) // different bg for consecutive rows + bg = color(); + else { bg = fl_color_average(color(), FL_BLACK, .9); if (fl_contrast(bg, FL_BLACK) == FL_WHITE) // widget has very dark text bg bg = fl_color_average(color(), FL_WHITE, .9); } - else - bg = color(); + fl_rectf(iX, y, tableWidth - hScroll->value(), rowHeight, bg); - } - else if (Fl::focus() == this) { - fl_rectf(iX, y, tableWidth - hScroll->value(), rowHeight, selection_color()); + fl_color(FL_FOREGROUND_COLOR); - - // Draw focus - fl_line_style(FL_DOT); - fl_rect(iX, y, tableWidth - hScroll->value(), rowHeight); - fl_line_style(FL_SOLID); } - else - fl_rectf(iX, y, tableWidth - hScroll->value(), rowHeight, selection_color()); + else { + if (Fl::focus() == this) { + fl_rectf(iX, y, tableWidth - hScroll->value(), rowHeight, selection_color()); + fl_color(FL_FOREGROUND_COLOR); + + // Draw focus + fl_line_style(FL_DOT); + fl_rect(iX, y, tableWidth - hScroll->value(), rowHeight); + fl_line_style(FL_SOLID); + } + else + fl_rectf(iX, y, tableWidth - hScroll->value(), rowHeight, selection_color()); + + fl_color(fl_contrast(FL_FOREGROUND_COLOR, selection_color())); + } - fl_color(FL_FOREGROUND_COLOR); // Get color from highlighter. Fl_Color color;