Skip to content

Commit 08a0552

Browse files
committed
clamped and refactored
1 parent 6983811 commit 08a0552

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

src/main.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ bool originalOverrideWasEmpty = false;
2222
songManager.setFinishedCalculatingSongLengths(false);
2323
songManager.setAdvancedLogs(Mod::get()->getSettingValue<bool>("advancedLogs"));
2424
songManager.setShowPlaybackProgressAndControls(Mod::get()->getSettingValue<bool>("showPlaybackProgressAndControls"));
25+
songManager.setShowPlaybackControlsSongList(Mod::get()->getSettingValue<bool>("showPlaybackProgressControlsSongList"));
2526
songManager.setIncrementDecrementByMilliseconds(Mod::get()->getSettingValue<int64_t>("incrementDecrementByMilliseconds"));
2627
songManager.setVibecodedVentilla(VIBECODED_RADIO && (VIBECODED_RADIO->isEnabled() || VIBECODED_RADIO->shouldLoad()));
2728
songManager.setUndefined0Alk1m123TouchPrio(BTP && (BTP->isEnabled() || BTP->shouldLoad()) && !BTP->hasUnresolvedDependencies() && !BTP->hasUnresolvedIncompatibilities());

src/ui/MLRSongCell.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ void MLRSongCell::checkIfCurrentSong() const {
199199
}
200200

201201
if (numVisible != newVisible && this->m_menu->getLayout()) {
202-
this->m_menu->setContentWidth(std::clamp<float>((30.f * newVisible) * (this->getContentHeight() / 36.f), 15.f, 30.f));
202+
this->m_menu->setContentWidth(std::clamp<float>(30.f / (36.f / this->getContentHeight()) * newVisible, 15.f, 30.f));
203203
this->m_menu->updateLayout();
204204
}
205205
}

src/ui/SongControlMenu.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ void SongControlMenu::checkDaSongPositions(float) {
252252
SongControlMenu::forceSharpCornerIllusion();
253253

254254
SongManager& songManager = SongManager::get();
255-
const bool canShowPlaybackProgress = CAN_USE_PLAYBACK_CONTROLS && !songManager.isOverride() && !VANILLA_GD_MENU_LOOP_DISABLED;
255+
const bool canShowPlaybackProgress = CAN_USE_PLAYBACK_CONTROLS && songManager.getShowPlaybackProgressAndControls() && !songManager.isOverride() && !VANILLA_GD_MENU_LOOP_DISABLED;
256256

257257
if (this->m_currTimeLb) this->m_currTimeLb->setVisible(canShowPlaybackProgress);
258258
if (this->m_totlTimeLb) this->m_totlTimeLb->setVisible(canShowPlaybackProgress);

0 commit comments

Comments
 (0)