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) : QWidget(parent), ui(new Ui::LegacyJarModPage), m_inst(inst)
{ {
ui->setupUi(this); ui->setupUi(this);
ui->tabWidget->tabBar()->hide();
m_jarmods = m_inst->jarModList(); m_jarmods = m_inst->jarModList();
ui->jarModsTreeView->setModel(m_jarmods.get()); ui->jarModsTreeView->setModel(m_jarmods.get());
ui->jarModsTreeView->setDragDropMode(QAbstractItemView::DragDrop); ui->jarModsTreeView->setDragDropMode(QAbstractItemView::DragDrop);

View File

@ -6,8 +6,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>378</width> <width>659</width>
<height>324</height> <height>593</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
@ -26,6 +26,16 @@
<property name="bottomMargin"> <property name="bottomMargin">
<number>0</number> <number>0</number>
</property> </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> <item>
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QHBoxLayout" name="horizontalLayout">
<item> <item>
@ -122,6 +132,10 @@
</item> </item>
</layout> </layout>
</item> </item>
</layout>
</widget>
</widget>
</item>
<item> <item>
<widget class="MCModInfoFrame" name="jarMIFrame"> <widget class="MCModInfoFrame" name="jarMIFrame">
<property name="sizePolicy"> <property name="sizePolicy">

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -6,14 +6,14 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>400</width> <width>731</width>
<height>300</height> <height>538</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
<string>Form</string> <string>Form</string>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QVBoxLayout" name="verticalLayout_2">
<property name="leftMargin"> <property name="leftMargin">
<number>0</number> <number>0</number>
</property> </property>
@ -26,6 +26,16 @@
<property name="bottomMargin"> <property name="bottomMargin">
<number>0</number> <number>0</number>
</property> </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> <item>
<widget class="QTextEdit" name="noteEditor"> <widget class="QTextEdit" name="noteEditor">
<property name="verticalScrollBarPolicy"> <property name="verticalScrollBarPolicy">
@ -41,6 +51,10 @@
</item> </item>
</layout> </layout>
</widget> </widget>
</widget>
</item>
</layout>
</widget>
<resources/> <resources/>
<connections/> <connections/>
</ui> </ui>

View File

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

View File

@ -13,7 +13,7 @@
<property name="windowTitle"> <property name="windowTitle">
<string>Form</string> <string>Form</string>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QVBoxLayout" name="verticalLayout_2">
<property name="leftMargin"> <property name="leftMargin">
<number>0</number> <number>0</number>
</property> </property>
@ -26,6 +26,16 @@
<property name="bottomMargin"> <property name="bottomMargin">
<number>0</number> <number>0</number>
</property> </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> <item>
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QHBoxLayout" name="horizontalLayout">
<item> <item>
@ -95,6 +105,10 @@
</item> </item>
</layout> </layout>
</widget> </widget>
</widget>
</item>
</layout>
</widget>
<tabstops> <tabstops>
<tabstop>text</tabstop> <tabstop>text</tabstop>
</tabstops> </tabstops>

View File

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

View File

@ -13,7 +13,7 @@
<property name="windowTitle"> <property name="windowTitle">
<string>Mods</string> <string>Mods</string>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_3"> <layout class="QVBoxLayout" name="verticalLayout">
<property name="leftMargin"> <property name="leftMargin">
<number>0</number> <number>0</number>
</property> </property>
@ -27,9 +27,15 @@
<number>0</number> <number>0</number>
</property> </property>
<item> <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"> <layout class="QHBoxLayout" name="horizontalLayout">
<item>
<layout class="QVBoxLayout" name="verticalLayout">
<item> <item>
<widget class="QListView" name="listView"> <widget class="QListView" name="listView">
<property name="selectionMode"> <property name="selectionMode">
@ -40,8 +46,6 @@
</property> </property>
</widget> </widget>
</item> </item>
</layout>
</item>
<item> <item>
<layout class="QVBoxLayout" name="verticalLayout_2"> <layout class="QVBoxLayout" name="verticalLayout_2">
<item> <item>
@ -88,6 +92,8 @@
</layout> </layout>
</item> </item>
</layout> </layout>
</widget>
</widget>
</item> </item>
</layout> </layout>
</widget> </widget>

View File

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

View File

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