mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Reduce the list row height in AudioDeviceSelectorComponent when the item height is reduced
This commit is contained in:
parent
1a0e681c41
commit
0ab5e696fe
1 changed files with 5 additions and 2 deletions
|
|
@ -146,7 +146,7 @@ public:
|
|||
if (items.isEmpty())
|
||||
{
|
||||
g.setColour (Colours::grey);
|
||||
g.setFont (13.0f);
|
||||
g.setFont (0.5f * getRowHeight());
|
||||
g.drawText (noItemsMessage,
|
||||
0, 0, getWidth(), getHeight() / 2,
|
||||
Justification::centred, true);
|
||||
|
|
@ -260,6 +260,7 @@ public:
|
|||
|
||||
if (outputChanList != nullptr)
|
||||
{
|
||||
outputChanList->setRowHeight (jmin (22, h));
|
||||
outputChanList->setBounds (r.removeFromTop (outputChanList->getBestHeight (maxListBoxHeight)));
|
||||
outputChanLabel->setBounds (0, outputChanList->getBounds().getCentreY() - h / 2, r.getX(), h);
|
||||
r.removeFromTop (space);
|
||||
|
|
@ -267,6 +268,7 @@ public:
|
|||
|
||||
if (inputChanList != nullptr)
|
||||
{
|
||||
inputChanList->setRowHeight (jmin (22, h));
|
||||
inputChanList->setBounds (r.removeFromTop (inputChanList->getBestHeight (maxListBoxHeight)));
|
||||
inputChanLabel->setBounds (0, inputChanList->getBounds().getCentreY() - h / 2, r.getX(), h);
|
||||
r.removeFromTop (space);
|
||||
|
|
@ -823,7 +825,7 @@ public:
|
|||
if (items.isEmpty())
|
||||
{
|
||||
g.setColour (Colours::grey);
|
||||
g.setFont (13.0f);
|
||||
g.setFont (0.5f * getRowHeight());
|
||||
g.drawText (noItemsMessage,
|
||||
0, 0, getWidth(), getHeight() / 2,
|
||||
Justification::centred, true);
|
||||
|
|
@ -1060,6 +1062,7 @@ void AudioDeviceSelectorComponent::resized()
|
|||
|
||||
if (midiInputsList != nullptr)
|
||||
{
|
||||
midiInputsList->setRowHeight (jmin (22, itemHeight));
|
||||
midiInputsList->setBounds (r.removeFromTop (midiInputsList->getBestHeight (jmin (itemHeight * 8,
|
||||
getHeight() - r.getY() - space - itemHeight))));
|
||||
r.removeFromTop (space);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue