Unify look of all pages.

Now they have a QTabWidget with no tabs as a background.
This commit is contained in:
Petr Mrázek 2014-07-21 00:10:13 +02:00
parent bc05ad30aa
commit 1ed90293ac
14 changed files with 607 additions and 525 deletions

View File

@ -35,6 +35,8 @@ LegacyJarModPage::LegacyJarModPage(LegacyInstance *inst, QWidget *parent)
: QWidget(parent), ui(new Ui::LegacyJarModPage), m_inst(inst)
{
ui->setupUi(this);
ui->tabWidget->tabBar()->hide();
m_jarmods = m_inst->jarModList();
ui->jarModsTreeView->setModel(m_jarmods.get());
ui->jarModsTreeView->setDragDropMode(QAbstractItemView::DragDrop);

View File

@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>378</width>
<height>324</height>
<width>659</width>
<height>593</height>
</rect>
</property>
<property name="windowTitle">
@ -26,6 +26,16 @@
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QTabWidget" name="tabWidget">
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="tab">
<attribute name="title">
<string>Tab 1</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
@ -122,6 +132,10 @@
</item>
</layout>
</item>
</layout>
</widget>
</widget>
</item>
<item>
<widget class="MCModInfoFrame" name="jarMIFrame">
<property name="sizePolicy">

View File

@ -11,6 +11,7 @@ LogPage::LogPage(MinecraftProcess *proc, QWidget *parent)
: QWidget(parent), ui(new Ui::LogPage), m_process(proc)
{
ui->setupUi(this);
ui->tabWidget->tabBar()->hide();
connect(m_process, SIGNAL(log(QString, MessageLevel::Enum)), this,
SLOT(write(QString, MessageLevel::Enum)));
}

View File

@ -13,7 +13,7 @@
<property name="windowTitle">
<string>Log</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<layout class="QVBoxLayout" name="verticalLayout">
<property name="leftMargin">
<number>0</number>
</property>
@ -26,13 +26,16 @@
<property name="bottomMargin">
<number>0</number>
</property>
<item row="2" column="1">
<widget class="QLineEdit" name="lineEdit">
<property name="enabled">
<bool>false</bool>
<item>
<widget class="QTabWidget" name="tabWidget">
<property name="currentIndex">
<number>0</number>
</property>
</widget>
</item>
<widget class="QWidget" name="tab">
<attribute name="title">
<string>Tab 1</string>
</attribute>
<layout class="QGridLayout" name="gridLayout">
<item row="2" column="0">
<widget class="QLabel" name="label">
<property name="enabled">
@ -43,6 +46,13 @@
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="lineEdit">
<property name="enabled">
<bool>false</bool>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QPushButton" name="pushButton">
<property name="enabled">
@ -134,6 +144,10 @@
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>

View File

@ -38,6 +38,7 @@ ModFolderPage::ModFolderPage(BaseInstance *inst, std::shared_ptr<ModList> mods,
: QWidget(parent), ui(new Ui::ModFolderPage)
{
ui->setupUi(this);
ui->tabWidget->tabBar()->hide();
m_inst = inst;
m_mods = mods;
m_id = id;

View File

@ -13,7 +13,7 @@
<property name="windowTitle">
<string>Mods</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<layout class="QVBoxLayout" name="verticalLayout">
<property name="leftMargin">
<number>0</number>
</property>
@ -27,10 +27,16 @@
<number>0</number>
</property>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QTabWidget" name="tabWidget">
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="tab">
<attribute name="title">
<string>Tab 1</string>
</attribute>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="ModListView" name="modTreeView">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
@ -46,9 +52,7 @@
</property>
</widget>
</item>
</layout>
</item>
<item>
<item row="0" column="1">
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QPushButton" name="addModBtn">
@ -86,9 +90,7 @@
</item>
</layout>
</item>
</layout>
</item>
<item>
<item row="1" column="0" colspan="2">
<widget class="MCModInfoFrame" name="frame">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
@ -100,6 +102,10 @@
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>ModListView</class>

View File

@ -5,6 +5,7 @@ NotesPage::NotesPage(BaseInstance *inst, QWidget *parent)
: QWidget(parent), ui(new Ui::NotesPage), m_inst(inst)
{
ui->setupUi(this);
ui->tabWidget->tabBar()->hide();
ui->noteEditor->setText(m_inst->notes());
}

View File

@ -6,14 +6,14 @@
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>300</height>
<width>731</width>
<height>538</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<layout class="QVBoxLayout" name="verticalLayout_2">
<property name="leftMargin">
<number>0</number>
</property>
@ -26,6 +26,16 @@
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QTabWidget" name="tabWidget">
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="tab">
<attribute name="title">
<string>Tab 1</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QTextEdit" name="noteEditor">
<property name="verticalScrollBarPolicy">
@ -41,6 +51,10 @@
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>

View File

@ -28,6 +28,7 @@ OtherLogsPage::OtherLogsPage(BaseInstance *instance, QWidget *parent)
m_watcher(new RecursiveFileSystemWatcher(this))
{
ui->setupUi(this);
ui->tabWidget->tabBar()->hide();
m_watcher->setFileExpression("(.*\\.log(\\.[0-9]*)?$)|(crash-.*\\.txt)");
m_watcher->setRootDir(QDir::current().absoluteFilePath(m_instance->minecraftRoot()));

View File

@ -13,7 +13,7 @@
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<layout class="QVBoxLayout" name="verticalLayout_2">
<property name="leftMargin">
<number>0</number>
</property>
@ -26,6 +26,16 @@
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QTabWidget" name="tabWidget">
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="tab">
<attribute name="title">
<string>Tab 1</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
@ -95,6 +105,10 @@
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>
<tabstops>
<tabstop>text</tabstop>
</tabstops>

View File

@ -222,6 +222,7 @@ ScreenshotsPage::ScreenshotsPage(BaseInstance *instance, QWidget *parent)
m_valid = ensureFolderPathExists(m_folder);
ui->setupUi(this);
ui->tabWidget->tabBar()->hide();
ui->listView->setModel(m_filterModel.get());
ui->listView->setIconSize(QSize(128, 128));
ui->listView->setGridSize(QSize(192, 160));

View File

@ -13,7 +13,7 @@
<property name="windowTitle">
<string>Mods</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<layout class="QVBoxLayout" name="verticalLayout">
<property name="leftMargin">
<number>0</number>
</property>
@ -27,9 +27,15 @@
<number>0</number>
</property>
<item>
<widget class="QTabWidget" name="tabWidget">
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="tab">
<attribute name="title">
<string>Tab 1</string>
</attribute>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QListView" name="listView">
<property name="selectionMode">
@ -40,8 +46,6 @@
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
@ -88,6 +92,8 @@
</layout>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>

View File

@ -63,7 +63,7 @@ VersionPage::VersionPage(OneSixInstance *inst, QWidget *parent)
: QWidget(parent), ui(new Ui::VersionPage), m_inst(inst)
{
ui->setupUi(this);
// libraries!
ui->tabWidget->tabBar()->hide();
m_version = m_inst->getFullVersion();
if (m_version)

View File

@ -6,17 +6,14 @@
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>475</height>
<width>693</width>
<height>575</height>
</rect>
</property>
<property name="windowTitle">
<string>Version</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="spacing">
<number>6</number>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="leftMargin">
<number>0</number>
</property>
@ -30,7 +27,15 @@
<number>0</number>
</property>
<item>
<layout class="QVBoxLayout" name="verticalLayout_10">
<widget class="QTabWidget" name="tabWidget">
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="tab">
<attribute name="title">
<string>Tab 1</string>
</attribute>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="ModListView" name="libraryTreeView">
<property name="verticalScrollBarPolicy">
@ -47,8 +52,6 @@
</attribute>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
@ -179,6 +182,10 @@
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>ModListView</class>