Browse Source

Removed const-ness from a couple of LookAndFeel method return values.

tags/2021-05-28
jules 13 years ago
parent
commit
88c17da08b
3 changed files with 16 additions and 15 deletions
  1. +1
    -0
      extras/Introjucer/Source/Project/jucer_Project.cpp
  2. +9
    -9
      modules/juce_gui_basics/lookandfeel/juce_LookAndFeel.cpp
  3. +6
    -6
      modules/juce_gui_basics/lookandfeel/juce_LookAndFeel.h

+ 1
- 0
extras/Introjucer/Source/Project/jucer_Project.cpp View File

@@ -236,6 +236,7 @@ Result Project::loadDocument (const File& file)
removeDefunctExporters();
setMissingDefaultValues();
setChangedFlag (false);
return Result::ok();
}


+ 9
- 9
modules/juce_gui_basics/lookandfeel/juce_LookAndFeel.cpp View File

@@ -501,8 +501,8 @@ AlertWindow* LookAndFeel::createAlertWindow (const String& title,
if (numButtons == 1)
{
aw->addButton (button1, 0,
KeyPress (KeyPress::escapeKey, 0, 0),
KeyPress (KeyPress::returnKey, 0, 0));
KeyPress (KeyPress::escapeKey),
KeyPress (KeyPress::returnKey));
}
else
{
@@ -513,14 +513,14 @@ AlertWindow* LookAndFeel::createAlertWindow (const String& title,
if (numButtons == 2)
{
aw->addButton (button1, 1, KeyPress (KeyPress::returnKey, 0, 0), button1ShortCut);
aw->addButton (button2, 0, KeyPress (KeyPress::escapeKey, 0, 0), button2ShortCut);
aw->addButton (button1, 1, KeyPress (KeyPress::returnKey), button1ShortCut);
aw->addButton (button2, 0, KeyPress (KeyPress::escapeKey), button2ShortCut);
}
else if (numButtons == 3)
{
aw->addButton (button1, 1, button1ShortCut);
aw->addButton (button2, 2, button2ShortCut);
aw->addButton (button3, 0, KeyPress (KeyPress::escapeKey, 0, 0));
aw->addButton (button3, 0, KeyPress (KeyPress::escapeKey));
}
}
@@ -608,12 +608,12 @@ int LookAndFeel::getAlertWindowButtonHeight()
return 28;
}
const Font LookAndFeel::getAlertWindowMessageFont()
Font LookAndFeel::getAlertWindowMessageFont()
{
return Font (15.0f);
}
const Font LookAndFeel::getAlertWindowFont()
Font LookAndFeel::getAlertWindowFont()
{
return Font (12.0f);
}
@@ -890,7 +890,7 @@ int LookAndFeel::getScrollbarButtonSize (ScrollBar& scrollbar)
}
//==============================================================================
const Path LookAndFeel::getTickShape (const float height)
Path LookAndFeel::getTickShape (const float height)
{
static const unsigned char tickShapeData[] =
{
@@ -907,7 +907,7 @@ const Path LookAndFeel::getTickShape (const float height)
return p;
}
const Path LookAndFeel::getCrossShape (const float height)
Path LookAndFeel::getCrossShape (const float height)
{
static const unsigned char crossShapeData[] =
{


+ 6
- 6
modules/juce_gui_basics/lookandfeel/juce_LookAndFeel.h View File

@@ -184,8 +184,8 @@ public:
bool isButtonDown);
//==============================================================================
/* AlertWindow handling..
*/
// AlertWindow handling..
virtual AlertWindow* createAlertWindow (const String& title,
const String& message,
const String& button1,
@@ -204,8 +204,8 @@ public:
virtual int getAlertWindowButtonHeight();
virtual const Font getAlertWindowMessageFont();
virtual const Font getAlertWindowFont();
virtual Font getAlertWindowMessageFont();
virtual Font getAlertWindowFont();
void setUsingNativeAlertWindows (bool shouldUseNativeAlerts);
bool isUsingNativeAlertWindows();
@@ -292,9 +292,9 @@ public:
//==============================================================================
/** Returns a tick shape for use in yes/no boxes, etc. */
virtual const Path getTickShape (float height);
virtual Path getTickShape (float height);
/** Returns a cross shape for use in yes/no boxes, etc. */
virtual const Path getCrossShape (float height);
virtual Path getCrossShape (float height);
//==============================================================================
/** Draws the + or - box in a treeview. */


Loading…
Cancel
Save