Use Branding in main window.
This commit is contained in:
parent
7594c85f2e
commit
90e10f63fa
@ -76,7 +76,8 @@ CalamaresApplication::init()
|
|||||||
|
|
||||||
initBranding();
|
initBranding();
|
||||||
|
|
||||||
setWindowIcon( QIcon( "from branding" ) );
|
setWindowIcon( QIcon( Calamares::Branding::instance()->
|
||||||
|
imagePath( Calamares::Branding::ProductIcon ) ) );
|
||||||
|
|
||||||
initPlugins();
|
initPlugins();
|
||||||
}
|
}
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
#include "utils/CalamaresUtilsGui.h"
|
#include "utils/CalamaresUtilsGui.h"
|
||||||
#include "utils/CalamaresStyle.h"
|
#include "utils/CalamaresStyle.h"
|
||||||
#include "utils/Logger.h"
|
#include "utils/Logger.h"
|
||||||
|
#include "Branding.h"
|
||||||
|
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QBoxLayout>
|
#include <QBoxLayout>
|
||||||
@ -36,6 +37,10 @@ CalamaresWindow::CalamaresWindow( QWidget* parent )
|
|||||||
// Hide close button
|
// Hide close button
|
||||||
setWindowFlags( Qt::Window | Qt::WindowTitleHint | Qt::CustomizeWindowHint );
|
setWindowFlags( Qt::Window | Qt::WindowTitleHint | Qt::CustomizeWindowHint );
|
||||||
|
|
||||||
|
setWindowTitle( tr( "%1 Installer" )
|
||||||
|
.arg( Calamares::Branding::instance()->
|
||||||
|
string( Calamares::Branding::ProductName ) ) );
|
||||||
|
|
||||||
setMinimumSize( 1010, 560 );
|
setMinimumSize( 1010, 560 );
|
||||||
QSize availableSize = qApp->desktop()->screenGeometry( this ).size();
|
QSize availableSize = qApp->desktop()->screenGeometry( this ).size();
|
||||||
int w = qBound( 1010, CalamaresUtils::defaultFontHeight() * 60, availableSize.width() );
|
int w = qBound( 1010, CalamaresUtils::defaultFontHeight() * 60, availableSize.width() );
|
||||||
@ -58,7 +63,7 @@ CalamaresWindow::CalamaresWindow( QWidget* parent )
|
|||||||
QHBoxLayout* logoLayout = new QHBoxLayout;
|
QHBoxLayout* logoLayout = new QHBoxLayout;
|
||||||
sideLayout->addLayout( logoLayout );
|
sideLayout->addLayout( logoLayout );
|
||||||
logoLayout->addStretch();
|
logoLayout->addStretch();
|
||||||
QLabel* logoLabel = new QLabel( "branding\ngoes\nhere", sideBox );
|
QLabel* logoLabel = new QLabel( sideBox );
|
||||||
{
|
{
|
||||||
QPalette plt = sideBox->palette();
|
QPalette plt = sideBox->palette();
|
||||||
sideBox->setAutoFillBackground( true );
|
sideBox->setAutoFillBackground( true );
|
||||||
@ -69,6 +74,9 @@ CalamaresWindow::CalamaresWindow( QWidget* parent )
|
|||||||
}
|
}
|
||||||
logoLabel->setAlignment( Qt::AlignCenter );
|
logoLabel->setAlignment( Qt::AlignCenter );
|
||||||
logoLabel->setFixedSize( 80, 80 );
|
logoLabel->setFixedSize( 80, 80 );
|
||||||
|
logoLabel->setPixmap( Calamares::Branding::instance()->
|
||||||
|
image( Calamares::Branding::ProductIcon,
|
||||||
|
logoLabel->size() ) );
|
||||||
logoLayout->addWidget( logoLabel );
|
logoLayout->addWidget( logoLabel );
|
||||||
logoLayout->addStretch();
|
logoLayout->addStretch();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user