The JUCE cross-platform C++ framework, with DISTRHO/KXStudio specific changes
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

527 lines
25KB

  1. /*
  2. ==============================================================================
  3. This file is part of the JUCE library.
  4. Copyright (c) 2022 - Raw Material Software Limited
  5. JUCE is an open source library subject to commercial or open-source
  6. licensing.
  7. By using JUCE, you agree to the terms of both the JUCE 7 End-User License
  8. Agreement and JUCE Privacy Policy.
  9. End User License Agreement: www.juce.com/juce-7-licence
  10. Privacy Policy: www.juce.com/juce-privacy-policy
  11. Or: You may also use this code under the terms of the GPL v3 (see
  12. www.gnu.org/licenses).
  13. JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
  14. EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
  15. DISCLAIMED.
  16. ==============================================================================
  17. */
  18. #include "../../Application/jucer_Headers.h"
  19. #include "jucer_ProjucerLookAndFeel.h"
  20. #include "../../Project/UI/jucer_ProjectContentComponent.h"
  21. //==============================================================================
  22. ProjucerLookAndFeel::ProjucerLookAndFeel()
  23. {
  24. setupColours();
  25. }
  26. ProjucerLookAndFeel::~ProjucerLookAndFeel() {}
  27. void ProjucerLookAndFeel::drawTabButton (TabBarButton& button, Graphics& g, bool isMouseOver, bool isMouseDown)
  28. {
  29. const auto area = button.getActiveArea();
  30. auto backgroundColour = findColour (button.isFrontTab() ? secondaryBackgroundColourId
  31. : inactiveTabBackgroundColourId);
  32. g.setColour (backgroundColour);
  33. g.fillRect (area);
  34. const auto alpha = button.isEnabled() ? ((isMouseOver || isMouseDown) ? 1.0f : 0.8f) : 0.3f;
  35. auto textColour = findColour (defaultTextColourId).withMultipliedAlpha (alpha);
  36. auto iconColour = findColour (button.isFrontTab() ? activeTabIconColourId
  37. : inactiveTabIconColourId);
  38. auto isProjectTab = button.getName() == ProjectContentComponent::getProjectTabName();
  39. if (isProjectTab)
  40. {
  41. auto icon = Icon (getIcons().closedFolder,
  42. iconColour.withMultipliedAlpha (alpha));
  43. auto isSingleTab = (button.getTabbedButtonBar().getNumTabs() == 1);
  44. if (isSingleTab)
  45. {
  46. auto activeArea = button.getActiveArea().reduced (5);
  47. activeArea.removeFromLeft (15);
  48. icon.draw (g, activeArea.removeFromLeft (activeArea.getHeight()).toFloat(), false);
  49. activeArea.removeFromLeft (10);
  50. g.setColour (textColour);
  51. g.drawFittedText (ProjectContentComponent::getProjectTabName(),
  52. activeArea, Justification::centredLeft, 1);
  53. }
  54. else
  55. {
  56. icon.draw (g, button.getTextArea().reduced (8, 8).toFloat(), false);
  57. }
  58. }
  59. else
  60. {
  61. TextLayout textLayout;
  62. LookAndFeel_V3::createTabTextLayout (button, (float) area.getWidth(), (float) area.getHeight(), textColour, textLayout);
  63. textLayout.draw (g, button.getTextArea().toFloat());
  64. }
  65. }
  66. int ProjucerLookAndFeel::getTabButtonBestWidth (TabBarButton& button, int)
  67. {
  68. if (TabbedButtonBar* bar = button.findParentComponentOfClass<TabbedButtonBar>())
  69. return bar->getWidth() / bar->getNumTabs();
  70. return 120;
  71. }
  72. void ProjucerLookAndFeel::drawPropertyComponentLabel (Graphics& g, int, int height, PropertyComponent& component)
  73. {
  74. g.setColour (component.findColour (defaultTextColourId)
  75. .withMultipliedAlpha (component.isEnabled() ? 1.0f : 0.6f));
  76. auto textWidth = getTextWidthForPropertyComponent (component);
  77. g.setFont (getPropertyComponentFont());
  78. g.drawFittedText (component.getName(), 0, 0, textWidth, height, Justification::centredLeft, 5, 1.0f);
  79. }
  80. Rectangle<int> ProjucerLookAndFeel::getPropertyComponentContentPosition (PropertyComponent& component)
  81. {
  82. const auto paddedTextW = getTextWidthForPropertyComponent (component) + 5;
  83. return { paddedTextW , 0, component.getWidth() - paddedTextW, component.getHeight() - 1 };
  84. }
  85. void ProjucerLookAndFeel::drawButtonBackground (Graphics& g,
  86. Button& button,
  87. const Colour& backgroundColour,
  88. bool isMouseOverButton,
  89. bool isButtonDown)
  90. {
  91. const auto cornerSize = button.findParentComponentOfClass<PropertyComponent>() != nullptr ? 0.0f : 3.0f;
  92. const auto bounds = button.getLocalBounds().toFloat();
  93. auto baseColour = backgroundColour.withMultipliedAlpha (button.isEnabled() ? 1.0f : 0.5f);
  94. if (isButtonDown || isMouseOverButton)
  95. baseColour = baseColour.contrasting (isButtonDown ? 0.2f : 0.05f);
  96. g.setColour (baseColour);
  97. if (button.isConnectedOnLeft() || button.isConnectedOnRight())
  98. {
  99. Path path;
  100. path.addRoundedRectangle (bounds.getX(), bounds.getY(),
  101. bounds.getWidth(), bounds.getHeight(),
  102. cornerSize, cornerSize,
  103. ! button.isConnectedOnLeft(),
  104. ! button.isConnectedOnRight(),
  105. ! button.isConnectedOnLeft(),
  106. ! button.isConnectedOnRight());
  107. g.fillPath (path);
  108. }
  109. else
  110. {
  111. g.fillRoundedRectangle (bounds, cornerSize);
  112. }
  113. }
  114. void ProjucerLookAndFeel::drawButtonText (Graphics& g, TextButton& button, bool isMouseOverButton, bool isButtonDown)
  115. {
  116. ignoreUnused (isMouseOverButton, isButtonDown);
  117. g.setFont (getTextButtonFont (button, button.getHeight()));
  118. g.setColour (button.findColour (button.getToggleState() ? TextButton::textColourOnId
  119. : TextButton::textColourOffId)
  120. .withMultipliedAlpha (button.isEnabled() ? 1.0f
  121. : 0.5f));
  122. auto xIndent = jmin (8, button.getWidth() / 10);
  123. auto yIndent = jmin (3, button.getHeight() / 6);
  124. auto textBounds = button.getLocalBounds().reduced (xIndent, yIndent);
  125. g.drawFittedText (button.getButtonText(), textBounds, Justification::centred, 3, 1.0f);
  126. }
  127. void ProjucerLookAndFeel::drawToggleButton (Graphics& g, ToggleButton& button, bool isMouseOverButton, bool isButtonDown)
  128. {
  129. ignoreUnused (isMouseOverButton, isButtonDown);
  130. if (! button.isEnabled())
  131. g.setOpacity (0.5f);
  132. bool isTextEmpty = button.getButtonText().isEmpty();
  133. bool isPropertyComponentChild = (dynamic_cast<BooleanPropertyComponent*> (button.getParentComponent()) != nullptr
  134. || dynamic_cast<MultiChoicePropertyComponent*> (button.getParentComponent()) != nullptr);
  135. auto bounds = button.getLocalBounds();
  136. auto sideLength = isPropertyComponentChild ? 25 : bounds.getHeight();
  137. auto rectBounds = isTextEmpty ? bounds
  138. : bounds.removeFromLeft (jmin (sideLength, bounds.getWidth() / 3));
  139. rectBounds = rectBounds.withSizeKeepingCentre (sideLength, sideLength).reduced (4);
  140. g.setColour (button.findColour (ToggleButton::tickDisabledColourId));
  141. g.drawRoundedRectangle (rectBounds.toFloat(), 2.0f, 1.0f);
  142. if (button.getToggleState())
  143. {
  144. g.setColour (button.findColour (ToggleButton::tickColourId));
  145. const auto tick = getTickShape (0.75f);
  146. g.fillPath (tick, tick.getTransformToScaleToFit (rectBounds.reduced (2).toFloat(), false));
  147. }
  148. if (! isTextEmpty)
  149. {
  150. bounds.removeFromLeft (5);
  151. const auto fontSize = jmin (15.0f, (float) button.getHeight() * 0.75f);
  152. g.setFont (fontSize);
  153. g.setColour (isPropertyComponentChild ? findColour (widgetTextColourId)
  154. : button.findColour (ToggleButton::textColourId));
  155. g.drawFittedText (button.getButtonText(), bounds, Justification::centredLeft, 2);
  156. }
  157. }
  158. void ProjucerLookAndFeel::fillTextEditorBackground (Graphics& g, int width, int height, TextEditor& textEditor)
  159. {
  160. g.setColour (textEditor.findColour (TextEditor::backgroundColourId));
  161. g.fillRect (0, 0, width, height);
  162. g.setColour (textEditor.findColour (TextEditor::outlineColourId));
  163. g.drawHorizontalLine (height - 1, 0.0f, static_cast<float> (width));
  164. }
  165. void ProjucerLookAndFeel::layoutFileBrowserComponent (FileBrowserComponent& browserComp,
  166. DirectoryContentsDisplayComponent* fileListComponent,
  167. FilePreviewComponent* previewComp,
  168. ComboBox* currentPathBox,
  169. TextEditor* filenameBox,
  170. Button* goUpButton)
  171. {
  172. const auto sectionHeight = 22;
  173. const auto buttonWidth = 50;
  174. auto b = browserComp.getLocalBounds().reduced (20, 5);
  175. auto topSlice = b.removeFromTop (sectionHeight);
  176. auto bottomSlice = b.removeFromBottom (sectionHeight);
  177. currentPathBox->setBounds (topSlice.removeFromLeft (topSlice.getWidth() - buttonWidth));
  178. currentPathBox->setColour (ComboBox::backgroundColourId, findColour (backgroundColourId));
  179. currentPathBox->setColour (ComboBox::textColourId, findColour (defaultTextColourId));
  180. currentPathBox->setColour (ComboBox::arrowColourId, findColour (defaultTextColourId));
  181. topSlice.removeFromLeft (6);
  182. goUpButton->setBounds (topSlice);
  183. bottomSlice.removeFromLeft (50);
  184. filenameBox->setBounds (bottomSlice);
  185. filenameBox->setColour (TextEditor::backgroundColourId, findColour (backgroundColourId));
  186. filenameBox->setColour (TextEditor::textColourId, findColour (defaultTextColourId));
  187. filenameBox->setColour (TextEditor::outlineColourId, findColour (defaultTextColourId));
  188. filenameBox->applyFontToAllText (filenameBox->getFont());
  189. if (previewComp != nullptr)
  190. previewComp->setBounds (b.removeFromRight (b.getWidth() / 3));
  191. if (auto listAsComp = dynamic_cast<Component*> (fileListComponent))
  192. listAsComp->setBounds (b.reduced (0, 10));
  193. }
  194. void ProjucerLookAndFeel::drawFileBrowserRow (Graphics& g, int width, int height,
  195. const File& file, const String& filename, Image* icon,
  196. const String& fileSizeDescription,
  197. const String& fileTimeDescription,
  198. bool isDirectory, bool isItemSelected,
  199. int itemIndex, DirectoryContentsDisplayComponent& dcc)
  200. {
  201. if (auto fileListComp = dynamic_cast<Component*> (&dcc))
  202. {
  203. fileListComp->setColour (DirectoryContentsDisplayComponent::textColourId,
  204. findColour (isItemSelected ? defaultHighlightedTextColourId : defaultTextColourId));
  205. fileListComp->setColour (DirectoryContentsDisplayComponent::highlightColourId,
  206. findColour (defaultHighlightColourId).withAlpha (0.75f));
  207. }
  208. LookAndFeel_V2::drawFileBrowserRow (g, width, height, file, filename, icon,
  209. fileSizeDescription, fileTimeDescription,
  210. isDirectory, isItemSelected, itemIndex, dcc);
  211. }
  212. void ProjucerLookAndFeel::drawCallOutBoxBackground (CallOutBox&, Graphics& g, const Path& path, Image&)
  213. {
  214. g.setColour (findColour (secondaryBackgroundColourId));
  215. g.fillPath (path);
  216. g.setColour (findColour (userButtonBackgroundColourId));
  217. g.strokePath (path, PathStrokeType (2.0f));
  218. }
  219. void ProjucerLookAndFeel::drawMenuBarBackground (Graphics& g, int width, int height,
  220. bool, MenuBarComponent& menuBar)
  221. {
  222. const auto colour = menuBar.findColour (backgroundColourId).withAlpha (0.75f);
  223. Rectangle<int> r (width, height);
  224. g.setColour (colour.contrasting (0.15f));
  225. g.fillRect (r.removeFromTop (1));
  226. g.fillRect (r.removeFromBottom (1));
  227. g.setGradientFill (ColourGradient (colour, 0, 0, colour.darker (0.2f), 0, (float)height, false));
  228. g.fillRect (r);
  229. }
  230. void ProjucerLookAndFeel::drawMenuBarItem (Graphics& g, int width, int height,
  231. int itemIndex, const String& itemText,
  232. bool isMouseOverItem, bool isMenuOpen,
  233. bool /*isMouseOverBar*/, MenuBarComponent& menuBar)
  234. {
  235. if (! menuBar.isEnabled())
  236. {
  237. g.setColour (menuBar.findColour (defaultTextColourId)
  238. .withMultipliedAlpha (0.5f));
  239. }
  240. else if (isMenuOpen || isMouseOverItem)
  241. {
  242. g.fillAll (menuBar.findColour (defaultHighlightColourId).withAlpha (0.75f));
  243. g.setColour (menuBar.findColour (defaultHighlightedTextColourId));
  244. }
  245. else
  246. {
  247. g.setColour (menuBar.findColour (defaultTextColourId));
  248. }
  249. g.setFont (getMenuBarFont (menuBar, itemIndex, itemText));
  250. g.drawFittedText (itemText, 0, 0, width, height, Justification::centred, 1);
  251. }
  252. void ProjucerLookAndFeel::drawResizableFrame (Graphics& g, int w, int h, const BorderSize<int>& border)
  253. {
  254. ignoreUnused (g, w, h, border);
  255. }
  256. void ProjucerLookAndFeel::drawComboBox (Graphics& g, int width, int height, bool,
  257. int, int, int, int, ComboBox& box)
  258. {
  259. const auto cornerSize = box.findParentComponentOfClass<ChoicePropertyComponent>() != nullptr ? 0.0f : 1.5f;
  260. Rectangle<int> boxBounds (0, 0, width, height);
  261. auto isChoiceCompChild = (box.findParentComponentOfClass<ChoicePropertyComponent>() != nullptr);
  262. if (isChoiceCompChild)
  263. {
  264. box.setColour (ComboBox::textColourId, findColour (widgetTextColourId));
  265. g.setColour (findColour (widgetBackgroundColourId));
  266. g.fillRect (boxBounds);
  267. auto arrowZone = boxBounds.removeFromRight (boxBounds.getHeight()).reduced (0, 2).toFloat();
  268. g.setColour (Colours::black);
  269. g.fillPath (getChoiceComponentArrowPath (arrowZone));
  270. }
  271. else
  272. {
  273. g.setColour (box.findColour (ComboBox::outlineColourId));
  274. g.drawRoundedRectangle (boxBounds.toFloat().reduced (0.5f, 0.5f), cornerSize, 1.0f);
  275. auto arrowZone = boxBounds.removeFromRight (boxBounds.getHeight()).toFloat();
  276. g.setColour (box.findColour (ComboBox::arrowColourId).withAlpha ((box.isEnabled() ? 0.9f : 0.2f)));
  277. g.fillPath (getArrowPath (arrowZone, 2, true, Justification::centred));
  278. }
  279. }
  280. void ProjucerLookAndFeel::drawTreeviewPlusMinusBox (Graphics& g, const Rectangle<float>& area,
  281. Colour, bool isOpen, bool /**isMouseOver*/)
  282. {
  283. g.strokePath (getArrowPath (area, isOpen ? 2 : 1, false, Justification::centredRight), PathStrokeType (2.0f));
  284. }
  285. ProgressBar::Style ProjucerLookAndFeel::getDefaultProgressBarStyle (const ProgressBar&)
  286. {
  287. return ProgressBar::Style::circular;
  288. }
  289. //==============================================================================
  290. Path ProjucerLookAndFeel::getArrowPath (Rectangle<float> arrowZone, const int direction,
  291. bool filled, const Justification justification)
  292. {
  293. auto w = jmin (arrowZone.getWidth(), (direction == 0 || direction == 2) ? 8.0f : filled ? 5.0f : 8.0f);
  294. auto h = jmin (arrowZone.getHeight(), (direction == 0 || direction == 2) ? 5.0f : filled ? 8.0f : 5.0f);
  295. if (justification == Justification::centred)
  296. {
  297. arrowZone.reduce ((arrowZone.getWidth() - w) / 2, (arrowZone.getHeight() - h) / 2);
  298. }
  299. else if (justification == Justification::centredRight)
  300. {
  301. arrowZone.removeFromLeft (arrowZone.getWidth() - w);
  302. arrowZone.reduce (0, (arrowZone.getHeight() - h) / 2);
  303. }
  304. else if (justification == Justification::centredLeft)
  305. {
  306. arrowZone.removeFromRight (arrowZone.getWidth() - w);
  307. arrowZone.reduce (0, (arrowZone.getHeight() - h) / 2);
  308. }
  309. else
  310. {
  311. jassertfalse; // currently only supports centred justifications
  312. }
  313. Path path;
  314. path.startNewSubPath (arrowZone.getX(), arrowZone.getBottom());
  315. path.lineTo (arrowZone.getCentreX(), arrowZone.getY());
  316. path.lineTo (arrowZone.getRight(), arrowZone.getBottom());
  317. if (filled)
  318. path.closeSubPath();
  319. path.applyTransform (AffineTransform::rotation ((float) direction * MathConstants<float>::halfPi,
  320. arrowZone.getCentreX(), arrowZone.getCentreY()));
  321. return path;
  322. }
  323. Path ProjucerLookAndFeel::getChoiceComponentArrowPath (Rectangle<float> arrowZone)
  324. {
  325. auto topBounds = arrowZone.removeFromTop (arrowZone.getHeight() * 0.5f);
  326. auto bottomBounds = arrowZone;
  327. auto topArrow = getArrowPath (topBounds, 0, true, Justification::centred);
  328. auto bottomArrow = getArrowPath (bottomBounds, 2, true, Justification::centred);
  329. topArrow.addPath (bottomArrow);
  330. return topArrow;
  331. }
  332. //==============================================================================
  333. void ProjucerLookAndFeel::setupColours()
  334. {
  335. auto& colourScheme = getCurrentColourScheme();
  336. if (colourScheme == getDarkColourScheme() || colourScheme == getProjucerDarkColourScheme())
  337. {
  338. setColour (backgroundColourId, Colour (0xff323e44));
  339. setColour (secondaryBackgroundColourId, Colour (0xff263238));
  340. setColour (defaultTextColourId, Colours::white);
  341. setColour (widgetTextColourId, Colours::white);
  342. setColour (defaultButtonBackgroundColourId, Colour (0xffa45c94));
  343. setColour (secondaryButtonBackgroundColourId, Colours::black);
  344. setColour (userButtonBackgroundColourId, Colour (0xffa45c94));
  345. setColour (defaultIconColourId, Colours::white);
  346. setColour (treeIconColourId, Colour (0xffa9a9a9));
  347. setColour (defaultHighlightColourId, Colour (0xffe0ec65));
  348. setColour (defaultHighlightedTextColourId, Colours::black);
  349. setColour (codeEditorLineNumberColourId, Colour (0xffaaaaaa));
  350. setColour (activeTabIconColourId, Colours::white);
  351. setColour (inactiveTabBackgroundColourId, Colour (0xff181f22));
  352. setColour (inactiveTabIconColourId, Colour (0xffa9a9a9));
  353. setColour (contentHeaderBackgroundColourId, Colours::black);
  354. setColour (widgetBackgroundColourId, Colour (0xff495358));
  355. setColour (secondaryWidgetBackgroundColourId, Colour (0xff303b41));
  356. colourScheme = getProjucerDarkColourScheme();
  357. }
  358. else if (colourScheme == getGreyColourScheme())
  359. {
  360. setColour (backgroundColourId, Colour (0xff505050));
  361. setColour (secondaryBackgroundColourId, Colour (0xff424241));
  362. setColour (defaultTextColourId, Colours::white);
  363. setColour (widgetTextColourId, Colours::black);
  364. setColour (defaultButtonBackgroundColourId, Colour (0xff26ba90));
  365. setColour (secondaryButtonBackgroundColourId, Colours::black);
  366. setColour (userButtonBackgroundColourId, Colour (0xff26ba90));
  367. setColour (defaultIconColourId, Colours::white);
  368. setColour (treeIconColourId, Colour (0xffa9a9a9));
  369. setColour (defaultHighlightColourId, Colour (0xffe0ec65));
  370. setColour (defaultHighlightedTextColourId, Colours::black);
  371. setColour (codeEditorLineNumberColourId, Colour (0xffaaaaaa));
  372. setColour (activeTabIconColourId, Colours::white);
  373. setColour (inactiveTabBackgroundColourId, Colour (0xff373737));
  374. setColour (inactiveTabIconColourId, Colour (0xffa9a9a9));
  375. setColour (contentHeaderBackgroundColourId, Colours::black);
  376. setColour (widgetBackgroundColourId, Colours::white);
  377. setColour (secondaryWidgetBackgroundColourId, Colour (0xffdddddd));
  378. }
  379. else if (colourScheme == getLightColourScheme())
  380. {
  381. setColour (backgroundColourId, Colour (0xffefefef));
  382. setColour (secondaryBackgroundColourId, Colour (0xfff9f9f9));
  383. setColour (defaultTextColourId, Colours::black);
  384. setColour (widgetTextColourId, Colours::black);
  385. setColour (defaultButtonBackgroundColourId, Colour (0xff42a2c8));
  386. setColour (secondaryButtonBackgroundColourId, Colour (0xffa1c677));
  387. setColour (userButtonBackgroundColourId, Colour (0xff42a2c8));
  388. setColour (defaultIconColourId, Colours::white);
  389. setColour (treeIconColourId, Colour (0xffa9a9a9));
  390. setColour (defaultHighlightColourId, Colours::orange);
  391. setColour (defaultHighlightedTextColourId, Colour (0xff585656));
  392. setColour (codeEditorLineNumberColourId, Colour (0xff888888));
  393. setColour (activeTabIconColourId, Colour (0xff42a2c8));
  394. setColour (inactiveTabBackgroundColourId, Colour (0xffd5d5d5));
  395. setColour (inactiveTabIconColourId, Colour (0xffa9a9a9));
  396. setColour (contentHeaderBackgroundColourId, Colour (0xff42a2c8));
  397. setColour (widgetBackgroundColourId, Colours::white);
  398. setColour (secondaryWidgetBackgroundColourId, Colour (0xfff4f4f4));
  399. }
  400. setColour (Label::textColourId, findColour (defaultTextColourId));
  401. setColour (Label::textWhenEditingColourId, findColour (widgetTextColourId));
  402. setColour (TextEditor::highlightColourId, findColour (defaultHighlightColourId).withAlpha (0.75f));
  403. setColour (TextEditor::highlightedTextColourId, findColour (defaultHighlightedTextColourId));
  404. setColour (TextEditor::outlineColourId, Colours::transparentBlack);
  405. setColour (TextEditor::focusedOutlineColourId, Colours::transparentBlack);
  406. setColour (TextEditor::backgroundColourId, findColour (widgetBackgroundColourId));
  407. setColour (TextEditor::textColourId, findColour (widgetTextColourId));
  408. setColour (TextButton::buttonColourId, findColour (defaultButtonBackgroundColourId));
  409. setColour (ScrollBar::ColourIds::thumbColourId, Colour (0xffd0d8e0));
  410. setColour (TextPropertyComponent::outlineColourId, Colours::transparentBlack);
  411. setColour (TextPropertyComponent::backgroundColourId, findColour (widgetBackgroundColourId));
  412. setColour (TextPropertyComponent::textColourId, findColour (widgetTextColourId));
  413. setColour (BooleanPropertyComponent::outlineColourId, Colours::transparentBlack);
  414. setColour (BooleanPropertyComponent::backgroundColourId, findColour (widgetBackgroundColourId));
  415. setColour (ToggleButton::tickDisabledColourId, Colour (0xffa9a9a9));
  416. setColour (ToggleButton::tickColourId, findColour (defaultButtonBackgroundColourId).withMultipliedBrightness (1.3f));
  417. setColour (CodeEditorComponent::backgroundColourId, findColour (secondaryBackgroundColourId));
  418. setColour (CodeEditorComponent::lineNumberTextId, findColour (codeEditorLineNumberColourId));
  419. setColour (CodeEditorComponent::lineNumberBackgroundId, findColour (backgroundColourId));
  420. setColour (CodeEditorComponent::highlightColourId, findColour (defaultHighlightColourId).withAlpha (0.5f));
  421. setColour (CaretComponent::caretColourId, findColour (defaultButtonBackgroundColourId));
  422. setColour (TreeView::selectedItemBackgroundColourId, findColour (defaultHighlightColourId));
  423. setColour (PopupMenu::highlightedBackgroundColourId, findColour (defaultHighlightColourId).withAlpha (0.75f));
  424. setColour (PopupMenu::highlightedTextColourId, findColour (defaultHighlightedTextColourId));
  425. setColour (ProgressBar::foregroundColourId, findColour (defaultButtonBackgroundColourId));
  426. setColour (0x1000440, /*LassoComponent::lassoFillColourId*/ findColour (defaultHighlightColourId).withAlpha (0.3f));
  427. }