Browse Source

tags/2021-05-28
jules 17 years ago
parent
commit
5065f7257c
3 changed files with 11 additions and 1 deletions
  1. +5
    -0
      src/juce_appframework/gui/components/layout/juce_MultiDocumentPanel.cpp
  2. +4
    -0
      src/juce_appframework/gui/components/layout/juce_MultiDocumentPanel.h
  3. +2
    -1
      src/juce_appframework/gui/components/lookandfeel/juce_LookAndFeel.cpp

+ 5
- 0
src/juce_appframework/gui/components/layout/juce_MultiDocumentPanel.cpp View File

@@ -161,6 +161,7 @@ void MultiDocumentPanel::addWindow (Component* component)
dw->setResizable (true, false);
dw->setContentComponent (component, false, true);
dw->setName (component->getName());
dw->setBackgroundColour (component->getComponentPropertyColour (T("mdiDocumentBkg_"), false, backgroundColour));
int x = 4;
Component* const topComp = getChildComponent (getNumChildComponents() - 1);
@@ -181,6 +182,10 @@ bool MultiDocumentPanel::addDocument (Component* const component,
const Colour& backgroundColour,
const bool deleteWhenRemoved)
{
// If you try passing a full DocumentWindow or ResizableWindow in here, you'll end up
// with a frame-within-a-frame! Just pass in the bare content component.
jassert (dynamic_cast <ResizableWindow*> (component) == 0);
if (component == 0 || (maximumNumDocuments > 0 && components.size() >= maximumNumDocuments))
return false;


+ 4
- 0
src/juce_appframework/gui/components/layout/juce_MultiDocumentPanel.h View File

@@ -132,6 +132,10 @@ public:
this will fail and return false. (If it does fail, the component passed-in will not be
deleted, even if deleteWhenRemoved was set to true).
The MultiDocumentPanel will deal with creating a window border to go around your component,
so just pass in the bare content component here, no need to give it a ResizableWindow
or DocumentWindow.
@param component the component to add
@param backgroundColour the background colour to use to fill the component's
window or tab


+ 2
- 1
src/juce_appframework/gui/components/lookandfeel/juce_LookAndFeel.cpp View File

@@ -1083,7 +1083,8 @@ void LookAndFeel::drawMenuBarItem (Graphics& g,
}
//==============================================================================
void LookAndFeel::fillTextEditorBackground (Graphics& g, int width, int height, TextEditor& textEditor)
void LookAndFeel::fillTextEditorBackground (Graphics& g, int /*width*/, int /*height*/,
TextEditor& textEditor)
{
g.fillAll (textEditor.findColour (TextEditor::backgroundColourId));
}


Loading…
Cancel
Save