screen max width fixes (#2663)

* max width fixes

* format
This commit is contained in:
Totoo
2025-05-23 08:42:19 +02:00
committed by GitHub
parent c80cae3638
commit ac31f4781c
33 changed files with 65 additions and 65 deletions

View File

@@ -42,7 +42,7 @@ GeoPos::GeoPos(
const alt_unit altitude_unit,
const spd_unit speed_unit)
: altitude_unit_(altitude_unit), speed_unit_(speed_unit) {
set_parent_rect({pos, {30 * 8, 3 * 16}});
set_parent_rect({pos, {screen_width, 3 * 16}});
add_children({&labels_position,
&label_spd_position,

View File

@@ -61,7 +61,7 @@ class AudioSpectrumView : public View {
' '};
Waveform waveform{
{0, 1 * 16 + cursor_band_height, 30 * 8, 2 * 16},
{0, 1 * 16 + cursor_band_height, screen_width, 2 * 16},
audio_spectrum,
128,
0,
@@ -150,7 +150,7 @@ class WaterfallView : public View {
private:
void update_widgets_rect();
const Rect audio_spectrum_view_rect{0 * 8, 0 * 16, 30 * 8, 2 * 16 + 20};
const Rect audio_spectrum_view_rect{0 * 8, 0 * 16, screen_width, 2 * 16 + 20};
static constexpr Dim audio_spectrum_height = 16 * 2 + 20;
static constexpr Dim scale_height = 20;

View File

@@ -137,7 +137,7 @@ TabView::TabView(std::initializer_list<TabDef> tab_definitions) {
size_t tab_width = screen_width / n_tabs;
set_parent_rect({0, 0, 30 * 8, 3 * 8});
set_parent_rect({0, 0, screen_width, 3 * 8});
for (auto& tab_definition : tab_definitions) {
tabs[i].set(i, tab_width, tab_definition.text, tab_definition.color);

View File

@@ -130,7 +130,7 @@ TransmitterView::TransmitterView(
const uint32_t channel_bandwidth,
const bool lock)
: lock_{lock} {
set_parent_rect({0, y, 30 * 8, 6 * 8});
set_parent_rect({0, y, screen_width, 6 * 8});
add_children({
&field_frequency,

View File

@@ -62,7 +62,7 @@ class TimeScopeView : public View {
};*/
Waveform waveform{
{0, 1 * 16 + cursor_band_height, 30 * 8, 2 * 16},
{0, 1 * 16 + cursor_band_height, screen_width, 2 * 16},
audio_spectrum,
128,
0,
@@ -117,7 +117,7 @@ class TVWidget : public View {
private:
void update_widgets_rect();
const Rect audio_spectrum_view_rect{0 * 8, 0 * 16, 30 * 8, 2 * 16 + 20};
const Rect audio_spectrum_view_rect{0 * 8, 0 * 16, screen_width, 2 * 16 + 20};
static constexpr Dim audio_spectrum_height = 16 * 2 + 20;
static constexpr Dim scale_height = 20;