fix: various bug fixes in desktop components
This commit is contained in:
@@ -106,13 +106,6 @@ void gui::desktop_draw_panel(DesktopState* ds) {
|
||||
draw_text(fb, date_x, clock_y, date_str, colors::PANEL_TEXT);
|
||||
|
||||
// Volume icon (to the left of the date)
|
||||
uint64_t now = montauk::get_milliseconds();
|
||||
if (now - ds->vol_last_poll > 5000) {
|
||||
int v = montauk::audio_get_volume(0);
|
||||
if (v >= 0 && !ds->vol_muted) ds->vol_level = v;
|
||||
ds->vol_last_poll = now;
|
||||
}
|
||||
|
||||
int vol_icon_x = date_x - 16 - 12;
|
||||
int vol_icon_y = (PANEL_HEIGHT - 16) / 2;
|
||||
ds->vol_icon_rect = {vol_icon_x, vol_icon_y, 16, 16};
|
||||
@@ -135,11 +128,6 @@ void gui::desktop_draw_panel(DesktopState* ds) {
|
||||
}
|
||||
|
||||
// Network icon (to the left of the volume icon)
|
||||
if (now - ds->net_cfg_last_poll > 5000) {
|
||||
montauk::get_netcfg(&ds->cached_net_cfg);
|
||||
ds->net_cfg_last_poll = now;
|
||||
}
|
||||
|
||||
int net_icon_x = vol_icon_x - 16 - 10;
|
||||
int net_icon_y = (PANEL_HEIGHT - 16) / 2;
|
||||
ds->net_icon_rect = {net_icon_x, net_icon_y, 16, 16};
|
||||
|
||||
Reference in New Issue
Block a user