Line data Source code
1 : /*
2 : ==============================================================================
3 : StyleTokens — pure C++ (no JUCE), all visual style constants.
4 : Included by StyleManager, RangeSlider, and tests.
5 : ==============================================================================
6 : */
7 :
8 : #pragma once
9 :
10 : #include <cstdint>
11 :
12 : namespace StyleTokens {
13 : // Panel backgrounds
14 : static constexpr uint32_t kPanelBg = 0xf0101010; // 94% dark grey
15 : static constexpr uint32_t kLogBg = 0xe8101010; // 91% dark grey
16 : static constexpr uint32_t kDialogBg = 0xff1a1a1a; // fully opaque
17 :
18 : // White overlay hierarchy (all on top of dark panels)
19 : static constexpr uint32_t kPanelTitle = 0xe6ffffff; // 90% — "PROJECT" heading
20 : static constexpr uint32_t kVoiceName = 0xd9ffffff; // 85% — voice name labels
21 : static constexpr uint32_t kValue = 0xccffffff; // 80% — numeric value labels
22 : static constexpr uint32_t kSectionHead = 0x80ffffff; // 50% — section headers
23 : static constexpr uint32_t kSecondary = 0x70ffffff;
24 : // 44% — secondary labels + scrollbar thumb
25 : static constexpr uint32_t kLabel = 0x60ffffff; // 38% — parameter labels
26 : static constexpr uint32_t kBorder = 0x50ffffff; // 31% — panel side borders
27 : static constexpr uint32_t kDivider = 0x30ffffff; // 19% — horizontal divider lines
28 : static constexpr uint32_t kScrollTrack = 0x20ffffff;
29 : // 12% — scrollbar track background
30 : static constexpr uint32_t kLogFallback = 0xffcccccc; // log entry fallback colour
31 : static constexpr uint32_t kLogInfo = 0xffb0b0b0; // info-level log entries
32 : static constexpr uint32_t kLogClock = 0xff5588bb; // debug clock entries
33 :
34 : // Video list
35 : static constexpr uint32_t kListRowSelected = 0x40ffffff;
36 : // 25% white — selected list row
37 :
38 : // LinearHorizontal Slider
39 : static constexpr uint32_t kSliderBg = 0xff404040;
40 : static constexpr uint32_t kSliderTrack = 0xff808080;
41 : static constexpr uint32_t kSliderThumb = 0xffffffff;
42 : static constexpr uint32_t kSliderText = 0xccffffff; // = kValue
43 : static constexpr uint32_t kSliderOutline = 0x30ffffff; // = kDivider
44 :
45 : // RangeSlider uses same Slider tokens above (via StyleManager::applyToSlider)
46 :
47 : // Button / ToggleButton
48 : static constexpr uint32_t kButtonBg = 0xff303030;
49 : static constexpr uint32_t kButtonBgOn = 0xff505050;
50 : static constexpr uint32_t kButtonText = 0xd9ffffff; // = kVoiceName
51 : static constexpr uint32_t kTickOn = 0xff32cd32; // brand green
52 : static constexpr uint32_t kTickOff = 0x80ffffff; // = kSectionHead
53 :
54 : // SeekBar
55 : static constexpr uint32_t kSeekBarBg = 0xff252525; // dark background
56 : static constexpr uint32_t kSeekBarTrack = 0xff404040; // unfilled track
57 : static constexpr uint32_t kSeekBarLoop = 0x8c42a2c8; // loop region highlight (blue 55%)
58 : static constexpr uint32_t kSeekBarPlayhead = 0xffffffff; // playhead handle — white
59 : static constexpr uint32_t kSeekBarHandle = 0xff42a2c8; // loop handles — JUCE default blue
60 : static constexpr uint32_t kSeekBarTime = 0x80ffffff; // time label text (50%)
61 :
62 : // ComboBox
63 : static constexpr uint32_t kComboBoxBg = 0xff252525;
64 : static constexpr uint32_t kComboBoxText = 0xd9ffffff; // = kVoiceName
65 : static constexpr uint32_t kComboBoxOutline = 0x50ffffff; // = kBorder
66 : static constexpr uint32_t kComboBoxArrow = 0x80ffffff; // = kSectionHead
67 :
68 : // Font sizes
69 : static constexpr float kHeadingSize = 13.0f;
70 : static constexpr float kLabelSize = 12.0f;
71 : static constexpr float kLogSize = 13.0f;
72 :
73 : // Layout spacing (pixels)
74 : static constexpr int kPadding = 10; // panel inner padding
75 : static constexpr int kRowHeight = 26; // options row height
76 : static constexpr int kListRowHeight = 22; // file list row height
77 : static constexpr int kSectionGap = 20; // gap before section header
78 : static constexpr int kSliderHeight = 28; // slider component height
79 : static constexpr int kButtonHeight = 26; // button height
80 : static constexpr int kDividerGap = 10; // space above divider line
81 : static constexpr int kScrollbarW = 6; // scrollbar width
82 :
83 : // ARGB byte extractors
84 11 : static constexpr uint8_t alpha(uint32_t argb) {
85 11 : return static_cast<uint8_t>((argb >> 24) & 0xff);
86 : }
87 :
88 4 : static constexpr uint8_t red(uint32_t argb) {
89 4 : return static_cast<uint8_t>((argb >> 16) & 0xff);
90 : }
91 :
92 : static constexpr uint8_t green(uint32_t argb) {
93 : return static_cast<uint8_t>((argb >> 8) & 0xff);
94 : }
95 :
96 : static constexpr uint8_t blue(uint32_t argb) {
97 : return static_cast<uint8_t>(argb & 0xff);
98 : }
99 : }
|