| 1298 | } |
| 1299 | |
| 1300 | void Timeline::resizeNameColumn(int width_px) { |
| 1301 | if (name_splitter_ == nullptr || width_px <= 0) { |
| 1302 | return; |
| 1303 | } |
| 1304 | const QList<int> sizes = name_splitter_->sizes(); |
| 1305 | if (sizes.size() == 2) { |
| 1306 | const int total = sizes[0] + sizes[1]; |
| 1307 | name_splitter_->setSizes({width_px, std::max(0, total - width_px)}); |
| 1308 | } |
| 1309 | } |
| 1310 | |
| 1311 | double Timeline::sceneHeight() const { |
| 1312 | const double rows_h = static_cast<double>(scene_.tracks().size()) * (kRowHeight + kRowGap); |