L5: dock-panel button refinements — overflow menu, tooltips, opposite-mode tag buttons
Top-bar rare-capture variants move to a right-anchored More popup; short faces gain hover-delay full-name tooltips (prefix stripped); bottom bar becomes four opposite-mode Item/Track tag buttons + Show Both (Toggle/Activates dropped); wider cluster gaps. New pure overflow_menu/mode_enable/tooltip modules, CTest-covered. Same actions, same contract.
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
// mode_enable — pure implementation. See mode_enable.h. NO REAPER / SWELL / LICE / vendor.
|
||||
|
||||
#include "mode_enable.h"
|
||||
|
||||
#include "view_mode_model.h" // kArrangeModeId / kDesignModeId — the ONE home for the mode ids
|
||||
|
||||
namespace reasampler {
|
||||
|
||||
bool tagButtonEnabled(const std::string& activeModeId, TagTarget target) {
|
||||
// The target's own mode id, so the rule is a single "target != active" compare.
|
||||
const char* targetId =
|
||||
(target == TagTarget::Arrange) ? kArrangeModeId : kDesignModeId;
|
||||
|
||||
// Fail-open on an unrecognized active id (neither seed mode): every button live, so a
|
||||
// future added mode never dead-locks the bar and the user can always reach the action.
|
||||
if (activeModeId != kArrangeModeId && activeModeId != kDesignModeId) return true;
|
||||
|
||||
return activeModeId != targetId;
|
||||
}
|
||||
|
||||
} // namespace reasampler
|
||||
Reference in New Issue
Block a user