kopia lustrzana https://github.com/jamescoxon/dl-fldigi
Fix logbook selection colour
* Use fl_contrast to adjust the foreground colour of the selected row * Make cosmetic change to logbook window titlepull/2/head
rodzic
8e1ef5a7ff
commit
e767b68a8c
|
@ -32,7 +32,9 @@ void start_logbook ()
|
||||||
logbook_filename = progdefaults.logbookfilename;
|
logbook_filename = progdefaults.logbookfilename;
|
||||||
|
|
||||||
adifFile.readFile (logbook_filename.c_str(), &qsodb);
|
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();
|
loadBrowser();
|
||||||
qsodb.isdirty(0);
|
qsodb.isdirty(0);
|
||||||
|
|
||||||
|
|
|
@ -109,16 +109,20 @@ void Table::drawRow(int row, char *rowData[], int x, int y) {
|
||||||
// Draw background box.
|
// Draw background box.
|
||||||
if (row != selected) {
|
if (row != selected) {
|
||||||
Fl_Color bg;
|
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);
|
bg = fl_color_average(color(), FL_BLACK, .9);
|
||||||
if (fl_contrast(bg, FL_BLACK) == FL_WHITE) // widget has very dark text bg
|
if (fl_contrast(bg, FL_BLACK) == FL_WHITE) // widget has very dark text bg
|
||||||
bg = fl_color_average(color(), FL_WHITE, .9);
|
bg = fl_color_average(color(), FL_WHITE, .9);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
bg = color();
|
|
||||||
fl_rectf(iX, y, tableWidth - hScroll->value(), rowHeight, bg);
|
fl_rectf(iX, y, tableWidth - hScroll->value(), rowHeight, bg);
|
||||||
|
|
||||||
|
fl_color(FL_FOREGROUND_COLOR);
|
||||||
}
|
}
|
||||||
else if (Fl::focus() == this) {
|
else {
|
||||||
|
if (Fl::focus() == this) {
|
||||||
fl_rectf(iX, y, tableWidth - hScroll->value(), rowHeight, selection_color());
|
fl_rectf(iX, y, tableWidth - hScroll->value(), rowHeight, selection_color());
|
||||||
fl_color(FL_FOREGROUND_COLOR);
|
fl_color(FL_FOREGROUND_COLOR);
|
||||||
|
|
||||||
|
@ -130,7 +134,9 @@ void Table::drawRow(int row, char *rowData[], int x, int y) {
|
||||||
else
|
else
|
||||||
fl_rectf(iX, y, tableWidth - hScroll->value(), rowHeight, selection_color());
|
fl_rectf(iX, y, tableWidth - hScroll->value(), rowHeight, selection_color());
|
||||||
|
|
||||||
fl_color(FL_FOREGROUND_COLOR);
|
fl_color(fl_contrast(FL_FOREGROUND_COLOR, selection_color()));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Get color from highlighter.
|
// Get color from highlighter.
|
||||||
Fl_Color color;
|
Fl_Color color;
|
||||||
|
|
Ładowanie…
Reference in New Issue