some more refactoring
- UIState.h: Replaced C-style arrays bool[] and ImVec4[] with std::array<bool, kMaxChannels> and std::array<ImVec4, kMaxChannels> for type safety and STL compatibility. - Application.cpp: Extracted duplicated DPI calculation (lines 189-196 and 475-481) into a systemDpiScale() helper method, reducing both call sites to single-line calls. - Application.cpp: Replaced magic 1400, 900 window dimensions with kDefaultWindowWidth/kDefaultWindowHeight constants (defined in Types.h). - AudioEngine.cpp: Named the magic epsilon thresholds 1e-20f → kLinearEpsilon and 1e-30f → kLogGuard with explanatory comments, defined in an anonymous namespace. - Types.h: Added kDefaultWindowWidth and kDefaultWindowHeight constants.
This commit is contained in:
@@ -66,6 +66,7 @@ private:
|
||||
float lastDpr_ = 0.0f;
|
||||
void applyUIScale(float scale);
|
||||
void requestUIScale(float scale);
|
||||
float systemDpiScale() const;
|
||||
void syncCanvasSize();
|
||||
|
||||
// UI visibility
|
||||
|
||||
Reference in New Issue
Block a user