mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-18 08:22:15 -07:00
Change opacity scaling.
This commit is contained in:
parent
94f6fa5ec4
commit
66092b102c
3 changed files with 5 additions and 5 deletions
|
|
@ -79,7 +79,8 @@ void DeckPreviewColorCircleWidget::paintEvent(QPaintEvent *event)
|
|||
if (SettingsCache::instance().getVisualDeckStorageDrawUnusedColorIdentities() || isActive) {
|
||||
// Make the circle faint if it is not active
|
||||
if (!isActive) {
|
||||
circleColor.setAlpha(SettingsCache::instance().getVisualDeckStorageUnusedColorIdentitiesOpacity());
|
||||
circleColor.setAlpha(SettingsCache::instance().getVisualDeckStorageUnusedColorIdentitiesOpacity() / 100.0 *
|
||||
255.0);
|
||||
}
|
||||
|
||||
// Draw the circle
|
||||
|
|
@ -100,13 +101,11 @@ void DeckPreviewColorCircleWidget::paintEvent(QPaintEvent *event)
|
|||
painter.setPen(Qt::black);
|
||||
}
|
||||
|
||||
|
||||
// Center the text within the circle
|
||||
painter.drawText(circleRect, Qt::AlignCenter, colorChar);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void DeckPreviewColorCircleWidget::setColorActive(bool active)
|
||||
{
|
||||
isActive = active;
|
||||
|
|
|
|||
|
|
@ -356,7 +356,7 @@ AppearanceSettingsPage::AppearanceSettingsPage()
|
|||
&SettingsCache::setVisualDeckStorageDrawUnusedColorIdentities);
|
||||
|
||||
visualDeckStorageUnusedColorIdentitiesOpacitySpinBox.setMinimum(0);
|
||||
visualDeckStorageUnusedColorIdentitiesOpacitySpinBox.setMaximum(255);
|
||||
visualDeckStorageUnusedColorIdentitiesOpacitySpinBox.setMaximum(100);
|
||||
visualDeckStorageUnusedColorIdentitiesOpacitySpinBox.setValue(
|
||||
settings.getVisualDeckStorageUnusedColorIdentitiesOpacity());
|
||||
connect(&visualDeckStorageUnusedColorIdentitiesOpacitySpinBox, &QSpinBox::valueChanged, &settings,
|
||||
|
|
@ -508,6 +508,7 @@ void AppearanceSettingsPage::retranslateUi()
|
|||
visualDeckStorageDrawUnusedColorIdentitiesCheckBox.setText(
|
||||
tr("Draw missing color identities in visual deck storage without color label"));
|
||||
visualDeckStorageUnusedColorIdentitiesOpacityLabel.setText((tr("Missing color identity opacity")));
|
||||
visualDeckStorageUnusedColorIdentitiesOpacitySpinBox.setSuffix("%");
|
||||
|
||||
cardsGroupBox->setTitle(tr("Card rendering"));
|
||||
displayCardNamesCheckBox.setText(tr("Display card names on cards having a picture"));
|
||||
|
|
|
|||
|
|
@ -265,7 +265,7 @@ SettingsCache::SettingsCache()
|
|||
visualDeckStorageDrawUnusedColorIdentities =
|
||||
settings->value("interface/visualdeckstoragedrawunusedcoloridentities", true).toBool();
|
||||
visualDeckStorageUnusedColorIdentitiesOpacity =
|
||||
settings->value("interface/visualdeckstorageunusedcoloridentitiesopacity", 80).toInt();
|
||||
settings->value("interface/visualdeckstorageunusedcoloridentitiesopacity", 30).toInt();
|
||||
horizontalHand = settings->value("hand/horizontal", true).toBool();
|
||||
invertVerticalCoordinate = settings->value("table/invert_vertical", false).toBool();
|
||||
minPlayersForMultiColumnLayout = settings->value("interface/min_players_multicolumn", 4).toInt();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue