mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-30 18:43:55 -07:00
[GDE, VDS & VDE] Tooltips and labels (#5916)
* Add correct inversion for isHidden() on bannerCardLabel. * Add tooltips to VDS buttons. * Add tooltip to GDE button. * Add tooltips to visual deck editor buttons. * Add tooltips to visual database display buttons. * Lint. --------- Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
This commit is contained in:
parent
34400c7f60
commit
99d9ce10c3
13 changed files with 46 additions and 1 deletions
|
|
@ -91,7 +91,7 @@ void DeckEditorDeckDockWidget::createDeckDock()
|
||||||
bannerCardLabel = new QLabel();
|
bannerCardLabel = new QLabel();
|
||||||
bannerCardLabel->setObjectName("bannerCardLabel");
|
bannerCardLabel->setObjectName("bannerCardLabel");
|
||||||
bannerCardLabel->setText(tr("Banner Card"));
|
bannerCardLabel->setText(tr("Banner Card"));
|
||||||
bannerCardLabel->setHidden(SettingsCache::instance().getDeckEditorBannerCardComboBoxVisible());
|
bannerCardLabel->setHidden(!SettingsCache::instance().getDeckEditorBannerCardComboBoxVisible());
|
||||||
bannerCardComboBox = new QComboBox(this);
|
bannerCardComboBox = new QComboBox(this);
|
||||||
connect(deckModel, &DeckListModel::dataChanged, this, [this]() {
|
connect(deckModel, &DeckListModel::dataChanged, this, [this]() {
|
||||||
// Delay the update to avoid race conditions
|
// Delay the update to avoid race conditions
|
||||||
|
|
@ -567,6 +567,7 @@ void DeckEditorDeckDockWidget::retranslateUi()
|
||||||
setWindowTitle(tr("Deck"));
|
setWindowTitle(tr("Deck"));
|
||||||
|
|
||||||
nameLabel->setText(tr("Deck &name:"));
|
nameLabel->setText(tr("Deck &name:"));
|
||||||
|
quickSettingsWidget->setToolTip(tr("Banner Card/Tags Visibility Settings"));
|
||||||
showBannerCardCheckBox->setText(tr("Show banner card selection menu"));
|
showBannerCardCheckBox->setText(tr("Show banner card selection menu"));
|
||||||
showTagsWidgetCheckBox->setText(tr("Show tags selection menu"));
|
showTagsWidgetCheckBox->setText(tr("Show tags selection menu"));
|
||||||
commentsLabel->setText(tr("&Comments:"));
|
commentsLabel->setText(tr("&Comments:"));
|
||||||
|
|
|
||||||
|
|
@ -58,6 +58,8 @@ void VisualDatabaseDisplayColorFilterWidget::retranslateUi()
|
||||||
toggleButton->setText(tr("Mode: Include/Exclude"));
|
toggleButton->setText(tr("Mode: Include/Exclude"));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
toggleButton->setToolTip(tr("Filter mode (AND/OR/NOT conjunctions of filters)"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void VisualDatabaseDisplayColorFilterWidget::handleColorToggled(QChar color, bool active)
|
void VisualDatabaseDisplayColorFilterWidget::handleColorToggled(QChar color, bool active)
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,7 @@ VisualDatabaseDisplayFilterSaveLoadWidget::VisualDatabaseDisplayFilterSaveLoadWi
|
||||||
void VisualDatabaseDisplayFilterSaveLoadWidget::retranslateUi()
|
void VisualDatabaseDisplayFilterSaveLoadWidget::retranslateUi()
|
||||||
{
|
{
|
||||||
saveButton->setText(tr("Save Filter"));
|
saveButton->setText(tr("Save Filter"));
|
||||||
|
saveButton->setToolTip(tr("Save all currently applied filters to a file"));
|
||||||
filenameInput->setPlaceholderText(tr("Enter filename..."));
|
filenameInput->setPlaceholderText(tr("Enter filename..."));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,6 +47,14 @@ VisualDatabaseDisplayMainTypeFilterWidget::VisualDatabaseDisplayMainTypeFilterWi
|
||||||
|
|
||||||
createMainTypeButtons(); // Populate buttons initially
|
createMainTypeButtons(); // Populate buttons initially
|
||||||
updateFilterMode(false); // Initialize toggle button text
|
updateFilterMode(false); // Initialize toggle button text
|
||||||
|
|
||||||
|
retranslateUi();
|
||||||
|
}
|
||||||
|
|
||||||
|
void VisualDatabaseDisplayMainTypeFilterWidget::retranslateUi()
|
||||||
|
{
|
||||||
|
spinBox->setToolTip(tr("Do not display card main-types with less than this amount of cards in the database"));
|
||||||
|
toggleButton->setToolTip(tr("Filter mode (AND/OR/NOT conjunctions of filters)"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void VisualDatabaseDisplayMainTypeFilterWidget::createMainTypeButtons()
|
void VisualDatabaseDisplayMainTypeFilterWidget::createMainTypeButtons()
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@ class VisualDatabaseDisplayMainTypeFilterWidget : public QWidget
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit VisualDatabaseDisplayMainTypeFilterWidget(QWidget *parent, FilterTreeModel *filterModel);
|
explicit VisualDatabaseDisplayMainTypeFilterWidget(QWidget *parent, FilterTreeModel *filterModel);
|
||||||
|
void retranslateUi();
|
||||||
void createMainTypeButtons();
|
void createMainTypeButtons();
|
||||||
void updateMainTypeButtonsVisibility();
|
void updateMainTypeButtonsVisibility();
|
||||||
int getMaxMainTypeCount() const;
|
int getMaxMainTypeCount() const;
|
||||||
|
|
|
||||||
|
|
@ -45,6 +45,7 @@ void VisualDatabaseDisplayNameFilterWidget::retranslateUi()
|
||||||
{
|
{
|
||||||
searchBox->setPlaceholderText(tr("Filter by name..."));
|
searchBox->setPlaceholderText(tr("Filter by name..."));
|
||||||
loadFromDeckButton->setText(tr("Load from Deck"));
|
loadFromDeckButton->setText(tr("Load from Deck"));
|
||||||
|
loadFromDeckButton->setToolTip(tr("Apply all card names in currently loaded deck as exact match name filters"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void VisualDatabaseDisplayNameFilterWidget::actLoadFromDeck()
|
void VisualDatabaseDisplayNameFilterWidget::actLoadFromDeck()
|
||||||
|
|
|
||||||
|
|
@ -51,6 +51,14 @@ VisualDatabaseDisplaySubTypeFilterWidget::VisualDatabaseDisplaySubTypeFilterWidg
|
||||||
|
|
||||||
createSubTypeButtons(); // Populate buttons initially
|
createSubTypeButtons(); // Populate buttons initially
|
||||||
updateFilterMode(false); // Initialize the toggle button text
|
updateFilterMode(false); // Initialize the toggle button text
|
||||||
|
|
||||||
|
retranslateUi();
|
||||||
|
}
|
||||||
|
|
||||||
|
void VisualDatabaseDisplaySubTypeFilterWidget::retranslateUi()
|
||||||
|
{
|
||||||
|
spinBox->setToolTip(tr("Do not display card sub-types with less than this amount of cards in the database"));
|
||||||
|
toggleButton->setToolTip(tr("Filter mode (AND/OR/NOT conjunctions of filters)"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void VisualDatabaseDisplaySubTypeFilterWidget::createSubTypeButtons()
|
void VisualDatabaseDisplaySubTypeFilterWidget::createSubTypeButtons()
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@ class VisualDatabaseDisplaySubTypeFilterWidget : public QWidget
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit VisualDatabaseDisplaySubTypeFilterWidget(QWidget *parent, FilterTreeModel *filterModel);
|
explicit VisualDatabaseDisplaySubTypeFilterWidget(QWidget *parent, FilterTreeModel *filterModel);
|
||||||
|
void retranslateUi();
|
||||||
void createSubTypeButtons();
|
void createSubTypeButtons();
|
||||||
void updateSubTypeButtonsVisibility();
|
void updateSubTypeButtonsVisibility();
|
||||||
int getMaxSubTypeCount() const;
|
int getMaxSubTypeCount() const;
|
||||||
|
|
|
||||||
|
|
@ -150,6 +150,18 @@ VisualDatabaseDisplayWidget::VisualDatabaseDisplayWidget(QWidget *parent,
|
||||||
|
|
||||||
connect(loadCardsTimer, &QTimer::timeout, this, [this]() { loadCurrentPage(); });
|
connect(loadCardsTimer, &QTimer::timeout, this, [this]() { loadCurrentPage(); });
|
||||||
loadCardsTimer->start(5000);
|
loadCardsTimer->start(5000);
|
||||||
|
|
||||||
|
retranslateUi();
|
||||||
|
}
|
||||||
|
|
||||||
|
void VisualDatabaseDisplayWidget::retranslateUi()
|
||||||
|
{
|
||||||
|
clearFilterWidget->setToolTip(tr("Clear all filters"));
|
||||||
|
|
||||||
|
quickFilterSaveLoadWidget->setToolTip(tr("Save and load filters"));
|
||||||
|
quickFilterNameWidget->setToolTip(tr("Filter by exact card name"));
|
||||||
|
quickFilterSubTypeWidget->setToolTip(tr("Filter by card sub-type"));
|
||||||
|
quickFilterSetWidget->setToolTip(tr("Filter by set"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void VisualDatabaseDisplayWidget::resizeEvent(QResizeEvent *event)
|
void VisualDatabaseDisplayWidget::resizeEvent(QResizeEvent *event)
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,7 @@ public:
|
||||||
AbstractTabDeckEditor *deckEditor,
|
AbstractTabDeckEditor *deckEditor,
|
||||||
CardDatabaseModel *database_model,
|
CardDatabaseModel *database_model,
|
||||||
CardDatabaseDisplayModel *database_display_model);
|
CardDatabaseDisplayModel *database_display_model);
|
||||||
|
void retranslateUi();
|
||||||
|
|
||||||
void adjustCardsPerPage();
|
void adjustCardsPerPage();
|
||||||
void populateCards();
|
void populateCards();
|
||||||
|
|
|
||||||
|
|
@ -190,7 +190,12 @@ void VisualDeckEditorWidget::retranslateUi()
|
||||||
{
|
{
|
||||||
sortLabel->setText(tr("Click and drag to change the sort order within the groups"));
|
sortLabel->setText(tr("Click and drag to change the sort order within the groups"));
|
||||||
searchPushButton->setText(tr("Quick search and add card"));
|
searchPushButton->setText(tr("Quick search and add card"));
|
||||||
|
searchPushButton->setToolTip(tr("Search for closest match in the database (with auto-suggestions) and add "
|
||||||
|
"preferred printing to the deck on pressing enter"));
|
||||||
|
sortCriteriaButton->setToolTip(tr("Configure how cards are sorted within their groups"));
|
||||||
displayTypeButton->setText(tr("Flat Layout"));
|
displayTypeButton->setText(tr("Flat Layout"));
|
||||||
|
displayTypeButton->setToolTip(
|
||||||
|
tr("Change how cards are displayed within zones (i.e. overlapped or fully visible.)"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void VisualDeckEditorWidget::updateZoneWidgets()
|
void VisualDeckEditorWidget::updateZoneWidgets()
|
||||||
|
|
|
||||||
|
|
@ -47,6 +47,7 @@ void DeckPreviewColorIdentityFilterWidget::retranslateUi()
|
||||||
{
|
{
|
||||||
// Set the toggle button text based on the current mode
|
// Set the toggle button text based on the current mode
|
||||||
toggleButton->setText(exactMatchMode ? tr("Mode: Exact Match") : tr("Mode: Includes"));
|
toggleButton->setText(exactMatchMode ? tr("Mode: Exact Match") : tr("Mode: Includes"));
|
||||||
|
toggleButton->setToolTip(tr("Color identity filter mode (AND/OR/NOT conjunctions of filters)"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void DeckPreviewColorIdentityFilterWidget::handleColorToggled(QChar color, bool active)
|
void DeckPreviewColorIdentityFilterWidget::handleColorToggled(QChar color, bool active)
|
||||||
|
|
|
||||||
|
|
@ -194,6 +194,9 @@ void VisualDeckStorageWidget::retranslateUi()
|
||||||
drawUnusedColorIdentitiesCheckBox->setText(tr("Draw unused Color Identities"));
|
drawUnusedColorIdentitiesCheckBox->setText(tr("Draw unused Color Identities"));
|
||||||
unusedColorIdentitiesOpacityLabel->setText(tr("Unused Color Identities Opacity"));
|
unusedColorIdentitiesOpacityLabel->setText(tr("Unused Color Identities Opacity"));
|
||||||
unusedColorIdentitiesOpacitySpinBox->setSuffix("%");
|
unusedColorIdentitiesOpacitySpinBox->setSuffix("%");
|
||||||
|
|
||||||
|
refreshButton->setToolTip(tr("Refresh loaded files"));
|
||||||
|
quickSettingsWidget->setToolTip(tr("Visual Deck Storage Settings"));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue