From 6838666a585992f6159b1a8271ab5b1c8a329e75 Mon Sep 17 00:00:00 2001 From: jules Date: Sat, 21 Jul 2012 14:38:03 +0100 Subject: [PATCH] Introjucer: modules panel tweak. --- .../Source/Project/jucer_ModulesPanel.h | 25 +++++++++++-------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/extras/Introjucer/Source/Project/jucer_ModulesPanel.h b/extras/Introjucer/Source/Project/jucer_ModulesPanel.h index e86f86fbc6..435bae9cb4 100644 --- a/extras/Introjucer/Source/Project/jucer_ModulesPanel.h +++ b/extras/Introjucer/Source/Project/jucer_ModulesPanel.h @@ -46,21 +46,17 @@ public: moduleList.rescan (ModuleList::getLocalModulesFolder (&project)); addAndMakeVisible (&modulesLocation); - modulesLocation.setBounds ("150, 3, parent.width - 180, 28"); modulesLocation.addListener (this); modulesLabel.attachToComponent (&modulesLocation, true); addAndMakeVisible (&updateModulesButton); - updateModulesButton.setBounds ("parent.width - 175, 3, parent.width - 4, 28"); updateModulesButton.addListener (this); moduleListBox.setOwner (this); addAndMakeVisible (&moduleListBox); - moduleListBox.setBounds ("4, 31, parent.width / 2 - 4, parent.height - 32"); addAndMakeVisible (©ingMessage); - copyingMessage.setBounds ("4, parent.height - 30, parent.width - 4, parent.height - 1"); copyingMessage.refresh(); } @@ -104,12 +100,10 @@ public: settings = nullptr; if (selectedModule != nullptr) - { addAndMakeVisible (settings = new ModuleSettingsPanel (project, moduleList, selectedModule->uid)); - settings->setBounds ("parent.width / 2 + 1, 31, parent.width - 3, parent.height - 32"); - } copyingMessage.refresh(); + resized(); } void refresh() @@ -127,6 +121,18 @@ public: getLookAndFeel().drawPropertyComponentBackground (g, getWidth(), getHeight(), *this); } + void resized() + { + modulesLocation.setBounds (150, 3, getWidth() - 180 - 150, 25); + updateModulesButton.setBounds (modulesLocation.getRight() + 6, 3, getWidth() - modulesLocation.getRight() - 12, 25); + moduleListBox.setBounds (4, 31, getWidth() / 3 - 4, getHeight() - 63); + copyingMessage.setBounds (4, getHeight() - 30, getWidth() - 8, getHeight() - 31); + + if (settings != nullptr) + settings->setBounds (moduleListBox.getRight() + 5, moduleListBox.getY(), + getWidth() - (moduleListBox.getRight() + 5), moduleListBox.getHeight()); + } + //============================================================================== class ModuleSelectionListBox : public ListBox, public ListBoxModel @@ -177,10 +183,7 @@ public: g.setColour (Colours::black); g.setFont (Font (height * 0.7f, Font::bold)); - g.drawFittedText (m->uid, height, 0, 200, height, Justification::centredLeft, 1); - - g.setFont (Font (height * 0.55f, Font::italic)); - g.drawText (m->name, height + 200, 0, width - height - 200, height, Justification::centredLeft, true); + g.drawFittedText (m->uid, height, 0, width - height, height, Justification::centredLeft, 1); } }