1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-22 07:10:06 +02:00

Use logo background to fill splash and about box.

This commit is contained in:
James Crook 2017-04-05 22:34:29 +01:00
parent fae1089b73
commit f5e67f5118
3 changed files with 15 additions and 3 deletions

View File

@ -429,7 +429,7 @@ visit our [[http://forum.audacityteam.org/|forum]].");
auto pPage = S.StartNotebookPage( _("Audacity") );
//pPage->SetBackgroundColour(wxColour(0xAB, 0xAB,0xAB ));
pPage->SetBackgroundColour(theTheme.Colour( clrAboutBoxBackground ));
//pPage->SetBackgroundColour(theTheme.Colour( clrAboutBoxBackground ));
S.StartVerticalLay(1);
{
//v For now, change to AudacityLogoWithName via old-fashioned way, not Theme.
@ -440,6 +440,11 @@ visit our [[http://forum.audacityteam.org/|forum]].");
// It also makes it easier to revert to full size if we decide to.
const float fScale = 0.5f;// smaller size.
wxImage RescaledImage(logo.ConvertToImage());
wxColour MainColour(
RescaledImage.GetRed(1,1),
RescaledImage.GetGreen(1,1),
RescaledImage.GetBlue(1,1));
pPage->SetBackgroundColour(MainColour);
// wxIMAGE_QUALITY_HIGH not supported by wxWidgets 2.6.1, or we would use it here.
RescaledImage.Rescale((int)(LOGOWITHNAME_WIDTH * fScale), (int)(LOGOWITHNAME_HEIGHT *fScale));
wxBitmap RescaledBitmap(RescaledImage);

View File

@ -58,7 +58,7 @@
//August 2009 - Theming not locked down enough for a stable release.
// This turns on the Theme panel in Prefs dialog. It is independent of EXPERIMENTAL_THEMING.
#define EXPERIMENTAL_THEME_PREFS
//#define EXPERIMENTAL_THEME_PREFS
//Next line enables Mic monitoring at times when it was previously off.
//More work is needed as after recording or playing it results in an

View File

@ -81,7 +81,7 @@ SplashDialog::SplashDialog(wxWindow * parent)
void SplashDialog::Populate( ShuttleGui & S )
{
this->SetBackgroundColour(theTheme.Colour( clrAboutBoxBackground ));
// this->SetBackgroundColour(theTheme.Colour( clrAboutBoxBackground ));
// this->SetBackgroundColour(wxColour(0xAB, 0xAB,0xAB ));
bool bShow;
gPrefs->Read(wxT("/GUI/ShowSplashScreen"), &bShow, true );
@ -90,11 +90,18 @@ void SplashDialog::Populate( ShuttleGui & S )
//v For now, change to AudacityLogoWithName via old-fashioned ways, not Theme.
m_pLogo = std::make_unique<wxBitmap>((const char **) AudacityLogoWithName_xpm); //v
// JKC: Resize to 50% of size. Later we may use a smaller xpm as
// our source, but this allows us to tweak the size - if we want to.
// It also makes it easier to revert to full size if we decide to.
const float fScale=0.5f;// smaller size.
wxImage RescaledImage( m_pLogo->ConvertToImage() );
wxColour MainColour(
RescaledImage.GetRed(1,1),
RescaledImage.GetGreen(1,1),
RescaledImage.GetBlue(1,1));
this->SetBackgroundColour(MainColour);
// wxIMAGE_QUALITY_HIGH not supported by wxWidgets 2.6.1, or we would use it here.
RescaledImage.Rescale( (int)(LOGOWITHNAME_WIDTH * fScale), (int)(LOGOWITHNAME_HEIGHT *fScale) );
wxBitmap RescaledBitmap( RescaledImage );