mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-31 03:00:05 +00:00
Minor fixes for clang.
This commit is contained in:
parent
88b50c5d7e
commit
3e628c816e
4 changed files with 59 additions and 60 deletions
|
|
@ -47,6 +47,7 @@ namespace CommandIDs
|
|||
showAppearanceSettings = 0x200077,
|
||||
showConfigPanel = 0x200074,
|
||||
showFilePanel = 0x200078,
|
||||
showTranslationTool = 0x200079,
|
||||
|
||||
closeWindow = 0x201001,
|
||||
closeAllDocuments = 0x201000,
|
||||
|
|
|
|||
|
|
@ -250,75 +250,75 @@ void JuceUpdater::paintListBoxItem (int /*rowNumber*/, Graphics& g, int /*width*
|
|||
g.fillAll (findColour (TextEditor::highlightColourId));
|
||||
}
|
||||
|
||||
Component* JuceUpdater::refreshComponentForRow (int rowNumber, bool /*isRowSelected*/, Component* existingComponentToUpdate)
|
||||
class UpdateListComponent : public Component
|
||||
{
|
||||
class UpdateListComponent : public Component
|
||||
public:
|
||||
UpdateListComponent()
|
||||
{
|
||||
public:
|
||||
UpdateListComponent()
|
||||
{
|
||||
addChildComponent (&toggle);
|
||||
toggle.setWantsKeyboardFocus (false);
|
||||
setInterceptsMouseClicks (false, true);
|
||||
}
|
||||
addChildComponent (&toggle);
|
||||
toggle.setWantsKeyboardFocus (false);
|
||||
setInterceptsMouseClicks (false, true);
|
||||
}
|
||||
|
||||
void setModule (const ModuleList::Module* newModule,
|
||||
const ModuleList::Module* existingModule,
|
||||
const Value& value)
|
||||
void setModule (const ModuleList::Module* newModule,
|
||||
const ModuleList::Module* existingModule,
|
||||
const Value& value)
|
||||
{
|
||||
if (newModule != nullptr)
|
||||
{
|
||||
if (newModule != nullptr)
|
||||
toggle.getToggleStateValue().referTo (value);
|
||||
toggle.setVisible (true);
|
||||
toggle.setEnabled (true);
|
||||
|
||||
name = newModule->uid;
|
||||
status = String::empty;
|
||||
|
||||
if (existingModule == nullptr)
|
||||
{
|
||||
toggle.getToggleStateValue().referTo (value);
|
||||
toggle.setVisible (true);
|
||||
toggle.setEnabled (true);
|
||||
|
||||
name = newModule->uid;
|
||||
status = String::empty;
|
||||
|
||||
if (existingModule == nullptr)
|
||||
{
|
||||
status << " (not currently installed)";
|
||||
}
|
||||
else if (existingModule->version != newModule->version)
|
||||
{
|
||||
status << " installed: " << existingModule->version
|
||||
<< ", available: " << newModule->version;
|
||||
}
|
||||
else
|
||||
{
|
||||
status << " (latest version already installed: " << existingModule->version << ")";
|
||||
toggle.setEnabled (false);
|
||||
}
|
||||
status << " (not currently installed)";
|
||||
}
|
||||
else if (existingModule->version != newModule->version)
|
||||
{
|
||||
status << " installed: " << existingModule->version
|
||||
<< ", available: " << newModule->version;
|
||||
}
|
||||
else
|
||||
{
|
||||
name = status = String::empty;
|
||||
toggle.setVisible (false);
|
||||
status << " (latest version already installed: " << existingModule->version << ")";
|
||||
toggle.setEnabled (false);
|
||||
}
|
||||
}
|
||||
|
||||
void paint (Graphics& g)
|
||||
else
|
||||
{
|
||||
g.setColour (Colours::black);
|
||||
g.setFont (getHeight() * 0.7f);
|
||||
|
||||
g.drawText (name, toggle.getRight() + 4, 0, getWidth() / 2 - toggle.getRight() - 4, getHeight(),
|
||||
Justification::centredLeft, true);
|
||||
|
||||
g.drawText (status, getWidth() / 2, 0, getWidth() / 2, getHeight(),
|
||||
Justification::centredLeft, true);
|
||||
name = status = String::empty;
|
||||
toggle.setVisible (false);
|
||||
}
|
||||
}
|
||||
|
||||
void resized()
|
||||
{
|
||||
toggle.setBounds (2, 2, getHeight() - 4, getHeight() - 4);
|
||||
}
|
||||
void paint (Graphics& g)
|
||||
{
|
||||
g.setColour (Colours::black);
|
||||
g.setFont (getHeight() * 0.7f);
|
||||
|
||||
private:
|
||||
ToggleButton toggle;
|
||||
String name, status;
|
||||
};
|
||||
g.drawText (name, toggle.getRight() + 4, 0, getWidth() / 2 - toggle.getRight() - 4, getHeight(),
|
||||
Justification::centredLeft, true);
|
||||
|
||||
g.drawText (status, getWidth() / 2, 0, getWidth() / 2, getHeight(),
|
||||
Justification::centredLeft, true);
|
||||
}
|
||||
|
||||
void resized()
|
||||
{
|
||||
toggle.setBounds (2, 2, getHeight() - 4, getHeight() - 4);
|
||||
}
|
||||
|
||||
private:
|
||||
ToggleButton toggle;
|
||||
String name, status;
|
||||
};
|
||||
|
||||
Component* JuceUpdater::refreshComponentForRow (int rowNumber, bool /*isRowSelected*/, Component* existingComponentToUpdate)
|
||||
{
|
||||
UpdateListComponent* c = dynamic_cast <UpdateListComponent*> (existingComponentToUpdate);
|
||||
if (c == nullptr)
|
||||
c = new UpdateListComponent();
|
||||
|
|
|
|||
|
|
@ -49,7 +49,6 @@ public:
|
|||
((ColourPropEditorComponent*) getChildComponent (0))->refresh();
|
||||
}
|
||||
|
||||
private:
|
||||
class ColourEditorComponent : public Component,
|
||||
public ChangeListener
|
||||
{
|
||||
|
|
@ -107,10 +106,6 @@ private:
|
|||
setColour (cs->getCurrentColour());
|
||||
}
|
||||
|
||||
private:
|
||||
Colour colour;
|
||||
bool canResetToDefault;
|
||||
|
||||
class ColourSelectorComp : public Component,
|
||||
public ButtonListener
|
||||
{
|
||||
|
|
@ -181,6 +176,10 @@ private:
|
|||
ColourSelectorWithSwatches selector;
|
||||
TextButton defaultButton;
|
||||
};
|
||||
|
||||
private:
|
||||
Colour colour;
|
||||
bool canResetToDefault;
|
||||
};
|
||||
|
||||
class ColourPropEditorComponent : public ColourEditorComponent
|
||||
|
|
|
|||
|
|
@ -63,7 +63,6 @@ public:
|
|||
|
||||
private:
|
||||
ReferenceCountedArray <MessageManager::MessageBase, CriticalSection> messages;
|
||||
CriticalSection lock;
|
||||
CFRunLoopRef runLoop;
|
||||
CFRunLoopSourceRef runLoopSource;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue