UltimMC: Misc improvements all over the place

This commit is contained in:
Neptune
2024-03-06 08:30:30 -05:00
parent c57d58f6f8
commit 82df3ac9ac
5 changed files with 11 additions and 18 deletions

View File

@@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>421</width>
<height>198</height>
<height>100</height>
</rect>
</property>
<property name="sizePolicy">

View File

@@ -223,8 +223,15 @@ void AccountListPage::updateButtonStates()
}
ui->actionRemove->setEnabled(accountIsReady);
ui->actionSetDefault->setEnabled(accountIsReady);
ui->actionUploadSkin->setEnabled(accountIsReady);
ui->actionDeleteSkin->setEnabled(accountIsReady);
// Don't enable skin change buttons for dummy and ely.by accounts, they don't work.
if (hasSelection) {
QModelIndex selected = selection.first();
MinecraftAccountPtr account = selected.data(AccountList::PointerRole).value<MinecraftAccountPtr>();
if (account->provider()->id() != "dummy" && account->provider()->id() != "elyby") {
ui->actionUploadSkin->setEnabled(accountIsReady);
ui->actionDeleteSkin->setEnabled(accountIsReady);
}
}
ui->actionRefresh->setEnabled(accountIsReady);
if(m_accounts->defaultAccount().get() == nullptr) {