diff --git a/ChangeLog b/ChangeLog index ffdddb52..1cfd708e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -21899,3 +21899,6 @@ 2021-06-16 Fred Gleason * Tweaked the field layout in the button widget labels in rdairplay(1). +2021-06-16 Fred Gleason + * Modified the Button Log widget in rdairplay(1) to be vertically + resizeable. diff --git a/lib/rdlogplay.h b/lib/rdlogplay.h index 1b654133..7e0ccb5a 100644 --- a/lib/rdlogplay.h +++ b/lib/rdlogplay.h @@ -40,8 +40,8 @@ // // Widget Settings // -#define LOGPLAY_MAX_PLAYS 7 -#define TRANSPORT_QUANTITY 7 +#define LOGPLAY_MAX_PLAYS 12 +#define TRANSPORT_QUANTITY 12 #define LOGPLAY_LOOKAHEAD_EVENTS 20 #define LOGPLAY_RESCAN_INTERVAL 5000 #define LOGPLAY_RESCAN_SIZE 30 diff --git a/rdairplay/button_log.cpp b/rdairplay/button_log.cpp index 22a6ad52..3ce9a5a6 100644 --- a/rdairplay/button_log.cpp +++ b/rdairplay/button_log.cpp @@ -459,6 +459,8 @@ void ButtonLog::resizeEvent(QResizeEvent *e) LOGLINEBOX_FULL_HEIGHT, LOGLINEBOX_FULL_HEIGHT); } + + QRect viewport=QRect(0,0,size().width(),size().height()); for(int i=BUTTON_PLAY_BUTTONS;isetGeometry(10+85, (LOGLINEBOX_FULL_HEIGHT+11)*3+ @@ -470,6 +472,10 @@ void ButtonLog::resizeEvent(QResizeEvent *e) (LOGLINEBOX_HALF_HEIGHT+11)*(i-3), LOGLINEBOX_FULL_HEIGHT, LOGLINEBOX_HALF_HEIGHT); + bool visible=viewport.contains(log_line_box[i]->geometry())&& + viewport.contains(log_start_button[i]->geometry()); + log_line_box[i]->setVisible(visible); + log_start_button[i]->setVisible(visible); } } diff --git a/rdairplay/button_log.h b/rdairplay/button_log.h index 8b17bcf5..64ada406 100644 --- a/rdairplay/button_log.h +++ b/rdairplay/button_log.h @@ -31,7 +31,7 @@ // Widget Settings // #define BUTTON_PLAY_BUTTONS 3 -#define BUTTON_TOTAL_BUTTONS 7 +#define BUTTON_TOTAL_BUTTONS 12 class ButtonLog : public RDWidget {