| 118 | } |
| 119 | |
| 120 | void BaseNetworkContentDownloadStatusWindow::UpdateWidgetSize(WidgetID widget, Dimension &size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension &fill, [[maybe_unused]] Dimension &resize) |
| 121 | { |
| 122 | switch (widget) { |
| 123 | case WID_NCDS_PROGRESS_BAR: { |
| 124 | auto max_value = GetParamMaxDigits(8); |
| 125 | size = GetStringBoundingBox(GetString(STR_CONTENT_DOWNLOAD_PROGRESS_SIZE, max_value, max_value, max_value)); |
| 126 | /* We need some spacing for the 'border' */ |
| 127 | size.height += WidgetDimensions::scaled.frametext.Horizontal(); |
| 128 | size.width += WidgetDimensions::scaled.frametext.Vertical(); |
| 129 | break; |
| 130 | } |
| 131 | |
| 132 | case WID_NCDS_PROGRESS_TEXT: |
| 133 | size.height = GetCharacterHeight(FS_NORMAL) * 2 + WidgetDimensions::scaled.vsep_normal; |
| 134 | break; |
| 135 | } |
| 136 | } |
| 137 | |
| 138 | void BaseNetworkContentDownloadStatusWindow::DrawWidget(const Rect &r, WidgetID widget) const |
| 139 | { |
nothing calls this directly
no test coverage detected