|
|
|
@ -10,37 +10,6 @@
|
|
|
|
|
|
|
|
|
|
#include <cmath>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class HorizontalTextWestTabStyle : public QProxyStyle
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
QSize sizeFromContents(ContentsType type, const QStyleOption* option, const QSize& size, const QWidget* widget) const
|
|
|
|
|
{
|
|
|
|
|
QSize s = QProxyStyle::sizeFromContents(type, option, size, widget);
|
|
|
|
|
if (type == QStyle::CT_TabBarTab)
|
|
|
|
|
{
|
|
|
|
|
s.transpose();
|
|
|
|
|
s.setHeight(s.height() + 20);
|
|
|
|
|
}
|
|
|
|
|
return s;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void drawControl(ControlElement element, const QStyleOption* option, QPainter* painter, const QWidget* widget) const
|
|
|
|
|
{
|
|
|
|
|
if (element == CE_TabBarTabLabel)
|
|
|
|
|
{
|
|
|
|
|
if (const QStyleOptionTab* tab = qstyleoption_cast<const QStyleOptionTab*>(option))
|
|
|
|
|
{
|
|
|
|
|
QStyleOptionTab opt(*tab);
|
|
|
|
|
opt.shape = QTabBar::RoundedNorth;
|
|
|
|
|
QProxyStyle::drawControl(element, &opt, painter, widget);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
QProxyStyle::drawControl(element, option, painter, widget);
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
Launcher::AdvancedPage::AdvancedPage(Files::ConfigurationManager &cfg,
|
|
|
|
|
Config::GameSettings &gameSettings,
|
|
|
|
|
Settings::Manager &engineSettings, QWidget *parent)
|
|
|
|
@ -53,7 +22,6 @@ Launcher::AdvancedPage::AdvancedPage(Files::ConfigurationManager &cfg,
|
|
|
|
|
setupUi(this);
|
|
|
|
|
|
|
|
|
|
loadSettings();
|
|
|
|
|
AdvancedTabWidget->tabBar()->setStyle(new HorizontalTextWestTabStyle);
|
|
|
|
|
mCellNameCompleter.setModel(&mCellNameCompleterModel);
|
|
|
|
|
startDefaultCharacterAtField->setCompleter(&mCellNameCompleter);
|
|
|
|
|
}
|
|
|
|
|