Browse Source

Minor thread fix. Introjucer: fixed colour of rollover help text.

tags/2021-05-28
jules 13 years ago
parent
commit
d92d5ba108
2 changed files with 4 additions and 5 deletions
  1. +1
    -1
      extras/Introjucer/Source/Utility/jucer_MiscUtilities.cpp
  2. +3
    -4
      modules/juce_core/threads/juce_Thread.cpp

+ 1
- 1
extras/Introjucer/Source/Utility/jucer_MiscUtilities.cpp View File

@@ -262,7 +262,7 @@ void RolloverHelpComp::paint (Graphics& g)
{
AttributedString s;
s.setJustification (Justification::centredLeft);
s.append (lastTip, Font (14.0f), Colour::greyLevel (0.15f));
s.append (lastTip, Font (14.0f), findColour (mainBackgroundColourId).contrasting (0.7f));
TextLayout tl;
tl.createLayoutWithBalancedLineLengths (s, getWidth() - 10.0f);


+ 3
- 4
modules/juce_core/threads/juce_Thread.cpp View File

@@ -156,15 +156,14 @@ bool Thread::waitForThreadToExit (const int timeOutMilliseconds) const
// Doh! So how exactly do you expect this thread to wait for itself to stop??
jassert (getThreadId() != getCurrentThreadId() || getCurrentThreadId() == 0);
const int sleepMsPerIteration = 5;
int count = timeOutMilliseconds / sleepMsPerIteration;
const uint32 timeoutEnd = Time::getMillisecondCounter() + timeOutMilliseconds;
while (isThreadRunning())
{
if (timeOutMilliseconds >= 0 && --count < 0)
if (timeOutMilliseconds >= 0 && Time::getMillisecondCounter() > timeoutEnd)
return false;
sleep (sleepMsPerIteration);
sleep (2);
}
return true;


Loading…
Cancel
Save