diff options
author | Petr Mrázek <peterix@gmail.com> | 2019-08-02 23:52:19 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2019-08-02 23:52:19 +0200 |
commit | 7b00d47fe0be0e23d1267699a8491c1dc577f76d (patch) | |
tree | cc14a07062dba29475e5aa94dad654c673c0d7f6 /application/pages/global | |
parent | 930d39b5f2c28bbc5d7156e6e1e20e0fa8194900 (diff) | |
download | MultiMC-7b00d47fe0be0e23d1267699a8491c1dc577f76d.tar MultiMC-7b00d47fe0be0e23d1267699a8491c1dc577f76d.tar.gz MultiMC-7b00d47fe0be0e23d1267699a8491c1dc577f76d.tar.lz MultiMC-7b00d47fe0be0e23d1267699a8491c1dc577f76d.tar.xz MultiMC-7b00d47fe0be0e23d1267699a8491c1dc577f76d.zip |
NOISSUE tweak UI geometry and remove old language selection
Diffstat (limited to 'application/pages/global')
-rw-r--r-- | application/pages/global/CustomCommandsPage.cpp | 1 | ||||
-rw-r--r-- | application/pages/global/MultiMCPage.cpp | 24 | ||||
-rw-r--r-- | application/pages/global/MultiMCPage.h | 2 | ||||
-rw-r--r-- | application/pages/global/MultiMCPage.ui | 15 |
4 files changed, 2 insertions, 40 deletions
diff --git a/application/pages/global/CustomCommandsPage.cpp b/application/pages/global/CustomCommandsPage.cpp index f2c3b185..3b182319 100644 --- a/application/pages/global/CustomCommandsPage.cpp +++ b/application/pages/global/CustomCommandsPage.cpp @@ -13,6 +13,7 @@ CustomCommandsPage::CustomCommandsPage(QWidget* parent): QWidget(parent) auto tabWidget = new QTabWidget(this); tabWidget->setObjectName(QStringLiteral("tabWidget")); commands = new CustomCommands(this); + commands->setContentsMargins(6, 6, 6, 6); tabWidget->addTab(commands, "Foo"); tabWidget->tabBar()->hide(); verticalLayout->addWidget(tabWidget); diff --git a/application/pages/global/MultiMCPage.cpp b/application/pages/global/MultiMCPage.cpp index 9baaa55b..541af287 100644 --- a/application/pages/global/MultiMCPage.cpp +++ b/application/pages/global/MultiMCPage.cpp @@ -78,7 +78,6 @@ MultiMCPage::MultiMCPage(QWidget *parent) : QWidget(parent), ui(new Ui::MultiMCP } connect(ui->fontSizeBox, SIGNAL(valueChanged(int)), SLOT(refreshFontPreview())); connect(ui->consoleFont, SIGNAL(currentFontChanged(QFont)), SLOT(refreshFontPreview())); - connect(ui->languageBox, SIGNAL(currentIndexChanged(int)), SLOT(languageIndexChanged(int))); } MultiMCPage::~MultiMCPage() @@ -147,19 +146,6 @@ void MultiMCPage::on_modsDirBrowseBtn_clicked() } } -void MultiMCPage::languageIndexChanged(int index) -{ - auto languageCode = ui->languageBox->itemData(ui->languageBox->currentIndex()).toString(); - if(languageCode.isEmpty()) - { - qWarning() << "Unknown language at index" << index; - return; - } - auto translations = MMC->translations(); - translations->selectLanguage(languageCode); - translations->updateLanguage(languageCode); -} - void MultiMCPage::refreshUpdateChannelList() { // Stop listening for selection changes. It's going to change a lot while we update it and @@ -236,10 +222,6 @@ void MultiMCPage::applySettings() { auto s = MMC->settings(); - // Language - auto langCode = ui->languageBox->itemData(ui->languageBox->currentIndex()).toString(); - s->set("Language", langCode.isEmpty() ? "en" : langCode); - if (ui->resetNotificationsBtn->isChecked()) { s->set("ShownNotifications", QString()); @@ -332,12 +314,6 @@ void MultiMCPage::applySettings() void MultiMCPage::loadSettings() { auto s = MMC->settings(); - // Language - { - ui->languageBox->setModel(m_languageModel.get()); - ui->languageBox->setCurrentIndex(ui->languageBox->findData(s->get("Language").toString())); - } - // Updates ui->autoUpdateCheckBox->setChecked(s->get("AutoUpdate").toBool()); m_currentUpdateChannel = s->get("UpdateChannel").toString(); diff --git a/application/pages/global/MultiMCPage.h b/application/pages/global/MultiMCPage.h index 7e7f655d..27a801be 100644 --- a/application/pages/global/MultiMCPage.h +++ b/application/pages/global/MultiMCPage.h @@ -68,8 +68,6 @@ slots: void on_modsDirBrowseBtn_clicked(); void on_iconsDirBrowseBtn_clicked(); - void languageIndexChanged(int index); - /*! * Updates the list of update channels in the combo box. */ diff --git a/application/pages/global/MultiMCPage.ui b/application/pages/global/MultiMCPage.ui index 124401c3..ea034919 100644 --- a/application/pages/global/MultiMCPage.ui +++ b/application/pages/global/MultiMCPage.ui @@ -6,7 +6,7 @@ <rect> <x>0</x> <y>0</y> - <width>467</width> + <width>514</width> <height>629</height> </rect> </property> @@ -229,18 +229,6 @@ </widget> </item> <item> - <widget class="QGroupBox" name="groupBox_2"> - <property name="title"> - <string>Language:</string> - </property> - <layout class="QVBoxLayout" name="verticalLayout"> - <item> - <widget class="QComboBox" name="languageBox"/> - </item> - </layout> - </widget> - </item> - <item> <widget class="QGroupBox" name="themeBox"> <property name="title"> <string>Theme</string> @@ -570,7 +558,6 @@ <tabstop>resetNotificationsBtn</tabstop> <tabstop>sortLastLaunchedBtn</tabstop> <tabstop>sortByNameBtn</tabstop> - <tabstop>languageBox</tabstop> <tabstop>themeComboBox</tabstop> <tabstop>themeComboBoxColors</tabstop> <tabstop>showConsoleCheck</tabstop> |