mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-30 08:51:10 +02:00
CScanTs: make better use of available space
With bigger font sizes, the the allocated space for satellite, transponder and frequency was getting smaller. Fix this by just keeping a safe space of 10 pixels to the radar icon. Conflicts: src/gui/scan.cpp Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
@@ -397,14 +397,15 @@ neutrino_msg_t CScanTs::handleMsg(neutrino_msg_t msg, neutrino_msg_data_t data)
|
||||
//printf("CScanTs::handleMsg: x %d xpos2 %d width %d w %d\n", x, xpos2, width, w);
|
||||
char buffer[128];
|
||||
char str[256];
|
||||
int w_to_radar = xpos_radar - xpos2 - 10;
|
||||
switch (msg) {
|
||||
case NeutrinoMessages::EVT_SCAN_SATELLITE:
|
||||
paintLine(xpos2, ypos_cur_satellite, w - (8*fw), (char *)data);
|
||||
paintLine(xpos2, ypos_cur_satellite, w_to_radar, (char *)data);
|
||||
break;
|
||||
|
||||
case NeutrinoMessages::EVT_SCAN_NUM_TRANSPONDERS:
|
||||
sprintf(buffer, "%ld", data);
|
||||
paintLine(xpos2, ypos_transponder, w - (8*fw), buffer);
|
||||
paintLine(xpos2, ypos_transponder, w_to_radar, buffer);
|
||||
total = data;
|
||||
snprintf(str, sizeof(buffer), "scan: %d/%d", done, total);
|
||||
CVFD::getInstance()->showMenuText(0, str, -1, true);
|
||||
@@ -414,7 +415,7 @@ neutrino_msg_t CScanTs::handleMsg(neutrino_msg_t msg, neutrino_msg_data_t data)
|
||||
//if (total == 0) data = 0; // why ??
|
||||
done = data;
|
||||
sprintf(buffer, "%d/%d", done, total);
|
||||
paintLine(xpos2, ypos_transponder, w - (8*fw), buffer);
|
||||
paintLine(xpos2, ypos_transponder, (ypos_transponder > ypos_radar + 66) ? w : w_to_radar, buffer);
|
||||
snprintf(str, sizeof(buffer), "scan %d/%d", done, total);
|
||||
CVFD::getInstance()->showMenuText(0, str, -1, true);
|
||||
break;
|
||||
@@ -441,10 +442,9 @@ neutrino_msg_t CScanTs::handleMsg(neutrino_msg_t msg, neutrino_msg_data_t data)
|
||||
CFrontend::getDelSys(feparams->delsys, feparams->code_rate_LP, feparams->modulation, f2, s, m);
|
||||
snprintf(buffer,sizeof(buffer), "%u %d %s %s %s %d ", freq, CFrontend::getFEBandwidth(feparams->bandwidth)/1000, f, f2, m, feparams->plp_id);
|
||||
}
|
||||
paintLine(xpos2, ypos_frequency, w - (7*fw), buffer);
|
||||
}
|
||||
break;
|
||||
|
||||
/* just assume that provider etc is always below radar picture */
|
||||
case NeutrinoMessages::EVT_SCAN_PROVIDER:
|
||||
paintLine(xpos2, ypos_provider, w, (char*)data); // UTF-8
|
||||
break;
|
||||
|
Reference in New Issue
Block a user