| 282 | } |
| 283 | |
| 284 | void SelectionBar::Populate() |
| 285 | { |
| 286 | SetBackgroundColour( theTheme.Colour( clrMedium ) ); |
| 287 | |
| 288 | mTimeControls[0] = mTimeControls[1] = {}; |
| 289 | |
| 290 | // Outer sizer has space top and left. |
| 291 | // Inner sizers have space on right only. |
| 292 | // This choice makes for a nice border and internal spacing and places clear responsibility |
| 293 | // on each sizer as to what spacings it creates. |
| 294 | wxFlexGridSizer *mainSizer = safenew wxFlexGridSizer(2, 1, 1); |
| 295 | Add(mainSizer, 0, wxALIGN_CENTER_VERTICAL | wxLEFT, 5); |
| 296 | |
| 297 | AddTitle(XO("Selection"), mainSizer); |
| 298 | AddTime(0, mainSizer); |
| 299 | AddSelectionSetupButton(mainSizer); |
| 300 | AddTime(1, mainSizer); |
| 301 | |
| 302 | mSetupButton->MoveBeforeInTabOrder(mTimeControls[0]); |
| 303 | |
| 304 | // Update the selection mode before the layout |
| 305 | SetSelectionMode(mSelectionMode); |
| 306 | mainSizer->Layout(); |
| 307 | RegenerateTooltips(); |
| 308 | Layout(); |
| 309 | |
| 310 | CallAfter([this]{ |
| 311 | auto &formats = ProjectNumericFormats::Get(mProject); |
| 312 | SetSelectionFormat(formats.GetSelectionFormat()); |
| 313 | }); |
| 314 | |
| 315 | } |
| 316 | |
| 317 | void SelectionBar::UpdatePrefs() |
| 318 | { |
nothing calls this directly
no test coverage detected