mirror of
https://github.com/clangen/musikcube.git
synced 2024-10-02 04:52:32 +00:00
Fix width of time tracker when muted
This commit is contained in:
parent
9077bb9fa6
commit
4af977657d
@ -774,8 +774,9 @@ void TransportWindow::Update(TimeMode timeMode) {
|
|||||||
|
|
||||||
const std::string replayGain = replayGainEnabled ? "rg" : "";
|
const std::string replayGain = replayGainEnabled ? "rg" : "";
|
||||||
|
|
||||||
|
int const escapedPercentSignWidth = (muted ? 0 : 1); /* 1 for escaped percent sign when not muted */
|
||||||
int const bottomRowControlsWidth =
|
int const bottomRowControlsWidth =
|
||||||
displayCache.Columns(volume) - (muted ? 0 : 1) + /* -1 for escaped percent sign when not muted */
|
displayCache.Columns(volume) - escapedPercentSignWidth +
|
||||||
(replayGainEnabled ? (narrow_cast<int>(u8cols(replayGain)) + 4) : 0) + /* [] brackets */
|
(replayGainEnabled ? (narrow_cast<int>(u8cols(replayGain)) + 4) : 0) + /* [] brackets */
|
||||||
narrow_cast<int>(u8cols(currentTime)) + 1 + /* +1 for space padding */
|
narrow_cast<int>(u8cols(currentTime)) + 1 + /* +1 for space padding */
|
||||||
/* timer track with thumb */
|
/* timer track with thumb */
|
||||||
@ -784,7 +785,8 @@ void TransportWindow::Update(TimeMode timeMode) {
|
|||||||
|
|
||||||
int const timerTrackWidth =
|
int const timerTrackWidth =
|
||||||
this->GetContentWidth() -
|
this->GetContentWidth() -
|
||||||
bottomRowControlsWidth - 1; /* this `- 1` is a hack i don't know why we need it please send help */
|
bottomRowControlsWidth -
|
||||||
|
escapedPercentSignWidth;
|
||||||
|
|
||||||
thumbOffset = 0;
|
thumbOffset = 0;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user