mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-21 06:53:53 +00:00
Merge pull request #2989 from Capostrophic/tabs
Make Advanced tab of the launcher look okay for everyone again
This commit is contained in:
commit
8e566fa7ab
2 changed files with 4 additions and 39 deletions
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -5,15 +5,12 @@
|
|||
<layout class="QVBoxLayout" name="pageVerticalLayout">
|
||||
<item>
|
||||
<widget class="QTabWidget" name="AdvancedTabWidget">
|
||||
<property name="tabPosition">
|
||||
<enum>QTabWidget::West</enum>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="GameMechanics">
|
||||
<attribute name="title">
|
||||
<string>Game mechanics</string>
|
||||
<string>Game Mechanics</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout">
|
||||
<item>
|
||||
|
@ -509,9 +506,9 @@ True: In non-combat mode camera is positioned behind the character's shoulder. C
|
|||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="InterfaceChanges">
|
||||
<widget class="QWidget" name="Interface">
|
||||
<attribute name="title">
|
||||
<string>Interface changes</string>
|
||||
<string>Interface</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout">
|
||||
<item>
|
||||
|
@ -618,7 +615,7 @@ True: In non-combat mode camera is positioned behind the character's shoulder. C
|
|||
</widget>
|
||||
<widget class="QWidget" name="BugFixes">
|
||||
<attribute name="title">
|
||||
<string>Bug fixes</string>
|
||||
<string>Bug Fixes</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout">
|
||||
<item>
|
||||
|
|
Loading…
Reference in a new issue