mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-24 01:54:22 +00:00
Minor tweaks and comment corrections.
This commit is contained in:
parent
4d7323fe0d
commit
af55d142d3
5 changed files with 29 additions and 24 deletions
|
|
@ -282,6 +282,14 @@ ConcertinaPanel::ConcertinaPanel()
|
|||
|
||||
ConcertinaPanel::~ConcertinaPanel() {}
|
||||
|
||||
Component* ConcertinaPanel::getPanel (int index) const noexcept
|
||||
{
|
||||
if (PanelHolder* h = holders[index])
|
||||
return h->component;
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void ConcertinaPanel::addPanel (int insertIndex, Component* component, bool takeOwnership)
|
||||
{
|
||||
jassert (component != nullptr); // can't use a null pointer here!
|
||||
|
|
|
|||
|
|
@ -86,10 +86,10 @@ void LookAndFeel_V3::drawConcertinaPanelHeader (Graphics& g, const Rectangle<int
|
|||
const Colour bkg (Colours::grey);
|
||||
|
||||
g.setGradientFill (ColourGradient (Colours::white.withAlpha (isMouseOver ? 0.4f : 0.2f), 0, (float) area.getY(),
|
||||
Colours::darkgrey.withAlpha (0.2f), 0, (float) area.getBottom(), false));
|
||||
Colours::darkgrey.withAlpha (0.1f), 0, (float) area.getBottom(), false));
|
||||
g.fillAll();
|
||||
|
||||
g.setColour (bkg.contrasting().withAlpha (0.04f));
|
||||
g.setColour (bkg.contrasting().withAlpha (0.1f));
|
||||
g.fillRect (area.withHeight (1));
|
||||
g.fillRect (area.withTop (area.getBottom() - 1));
|
||||
|
||||
|
|
|
|||
|
|
@ -542,10 +542,10 @@ UIViewComponentPeer::~UIViewComponentPeer()
|
|||
//==============================================================================
|
||||
void UIViewComponentPeer::setVisible (bool shouldBeVisible)
|
||||
{
|
||||
view.hidden = ! shouldBeVisible;
|
||||
|
||||
if (! isSharedWindow)
|
||||
window.hidden = ! shouldBeVisible;
|
||||
|
||||
view.hidden = ! shouldBeVisible;
|
||||
}
|
||||
|
||||
void UIViewComponentPeer::setTitle (const String&)
|
||||
|
|
|
|||
|
|
@ -610,7 +610,7 @@ public:
|
|||
you want the tree to contain a number of root items, you should still use a single
|
||||
root item above these, but hide it using setRootItemVisible().
|
||||
|
||||
You can pass in 0 to this method to clear the tree and remove its current root item.
|
||||
You can pass nullptr to this method to clear the tree and remove its current root item.
|
||||
|
||||
The object passed in will not be deleted by the treeview, it's up to the caller
|
||||
to delete it when no longer needed. BUT make absolutely sure that you don't delete
|
||||
|
|
@ -711,17 +711,13 @@ public:
|
|||
|
||||
//==============================================================================
|
||||
/** Returns the number of rows the tree is using.
|
||||
|
||||
This will depend on which items are open.
|
||||
|
||||
@see TreeViewItem::getRowNumberInTree()
|
||||
*/
|
||||
int getNumRowsInTree() const;
|
||||
|
||||
/** Returns the item on a particular row of the tree.
|
||||
|
||||
If the index is out of range, this will return 0.
|
||||
|
||||
@see getNumRowsInTree, TreeViewItem::getRowNumberInTree()
|
||||
*/
|
||||
TreeViewItem* getItemOnRow (int index) const;
|
||||
|
|
|
|||
|
|
@ -714,22 +714,23 @@ void OpenGLContext::setAssociatedObject (const char* name, ReferenceCountedObjec
|
|||
{
|
||||
jassert (name != nullptr);
|
||||
|
||||
CachedImage* const c = getCachedImage();
|
||||
|
||||
// This method must only be called from an openGL rendering callback.
|
||||
jassert (c != nullptr && nativeContext != nullptr);
|
||||
jassert (getCurrentContext() != nullptr);
|
||||
|
||||
const int index = c->associatedObjectNames.indexOf (name);
|
||||
|
||||
if (index >= 0)
|
||||
if (CachedImage* const c = getCachedImage())
|
||||
{
|
||||
c->associatedObjects.set (index, newObject);
|
||||
}
|
||||
else
|
||||
{
|
||||
c->associatedObjectNames.add (name);
|
||||
c->associatedObjects.add (newObject);
|
||||
// This method must only be called from an openGL rendering callback.
|
||||
jassert (nativeContext != nullptr);
|
||||
jassert (getCurrentContext() != nullptr);
|
||||
|
||||
const int index = c->associatedObjectNames.indexOf (name);
|
||||
|
||||
if (index >= 0)
|
||||
{
|
||||
c->associatedObjects.set (index, newObject);
|
||||
}
|
||||
else
|
||||
{
|
||||
c->associatedObjectNames.add (name);
|
||||
c->associatedObjects.add (newObject);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue