mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-30 22:15:32 +00:00
Make Advanced tab of the launcher look okay for everyone again
This commit is contained in:
parent
a9cf82c7d0
commit
c436f29a1e
2 changed files with 4 additions and 39 deletions
|
@ -10,37 +10,6 @@
|
||||||
|
|
||||||
#include <cmath>
|
#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,
|
Launcher::AdvancedPage::AdvancedPage(Files::ConfigurationManager &cfg,
|
||||||
Config::GameSettings &gameSettings,
|
Config::GameSettings &gameSettings,
|
||||||
Settings::Manager &engineSettings, QWidget *parent)
|
Settings::Manager &engineSettings, QWidget *parent)
|
||||||
|
@ -53,7 +22,6 @@ Launcher::AdvancedPage::AdvancedPage(Files::ConfigurationManager &cfg,
|
||||||
setupUi(this);
|
setupUi(this);
|
||||||
|
|
||||||
loadSettings();
|
loadSettings();
|
||||||
AdvancedTabWidget->tabBar()->setStyle(new HorizontalTextWestTabStyle);
|
|
||||||
mCellNameCompleter.setModel(&mCellNameCompleterModel);
|
mCellNameCompleter.setModel(&mCellNameCompleterModel);
|
||||||
startDefaultCharacterAtField->setCompleter(&mCellNameCompleter);
|
startDefaultCharacterAtField->setCompleter(&mCellNameCompleter);
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,15 +5,12 @@
|
||||||
<layout class="QVBoxLayout" name="pageVerticalLayout">
|
<layout class="QVBoxLayout" name="pageVerticalLayout">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QTabWidget" name="AdvancedTabWidget">
|
<widget class="QTabWidget" name="AdvancedTabWidget">
|
||||||
<property name="tabPosition">
|
|
||||||
<enum>QTabWidget::West</enum>
|
|
||||||
</property>
|
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="GameMechanics">
|
<widget class="QWidget" name="GameMechanics">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
<string>Game mechanics</string>
|
<string>Game Mechanics</string>
|
||||||
</attribute>
|
</attribute>
|
||||||
<layout class="QVBoxLayout">
|
<layout class="QVBoxLayout">
|
||||||
<item>
|
<item>
|
||||||
|
@ -509,9 +506,9 @@ True: In non-combat mode camera is positioned behind the character's shoulder. C
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="InterfaceChanges">
|
<widget class="QWidget" name="Interface">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
<string>Interface changes</string>
|
<string>Interface</string>
|
||||||
</attribute>
|
</attribute>
|
||||||
<layout class="QVBoxLayout">
|
<layout class="QVBoxLayout">
|
||||||
<item>
|
<item>
|
||||||
|
@ -618,7 +615,7 @@ True: In non-combat mode camera is positioned behind the character's shoulder. C
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="BugFixes">
|
<widget class="QWidget" name="BugFixes">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
<string>Bug fixes</string>
|
<string>Bug Fixes</string>
|
||||||
</attribute>
|
</attribute>
|
||||||
<layout class="QVBoxLayout">
|
<layout class="QVBoxLayout">
|
||||||
<item>
|
<item>
|
||||||
|
|
Loading…
Reference in a new issue