Merge branch 'main' into pr-4379

This commit is contained in:
GithubAnon0000 2025-11-13 23:16:18 +00:00 committed by GitHub
commit f4dd63e30b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 27 additions and 5 deletions

View file

@ -254,6 +254,7 @@ nav1s <nav1s@proton.me>
Ranjit Odedra <ranjitodedra.dev@gmail.com>
Eltaurus <https://github.com/Eltaurus-Lt>
jariji
Francisco Esteva <fr.esteva@duocuc.cl>
********************

View file

@ -47,6 +47,9 @@
<property name="insertPolicy">
<enum>QComboBox::NoInsert</enum>
</property>
<property name="sizeAdjustPolicy">
<enum>QComboBox::SizeAdjustPolicy::AdjustToMinimumContentsLengthWithIcon</enum>
</property>
</widget>
</item>
</layout>

View file

@ -94,8 +94,15 @@ class TTSPlayer:
rank -= 1
# if no preferred voices match, we fall back on language
# with a rank of -100
# if no requested voices match, use a preferred fallback voice
# (for example, Apple Samantha) with rank of -50
for avail in avail_voices:
if avail.lang == tag.lang:
if avail.lang == "en_US" and avail.name.startswith("Apple_Samantha"):
return TTSVoiceMatch(voice=avail, rank=-50)
# if no requested or preferred voices match, we fall back on
# the first available voice for the language, with a rank of -100
for avail in avail_voices:
if avail.lang == tag.lang:
return TTSVoiceMatch(voice=avail, rank=-100)

View file

@ -809,7 +809,7 @@ def ensureWidgetInScreenBoundaries(widget: QWidget) -> None:
wsize = widget.size()
cappedWidth = min(geom.width(), wsize.width())
cappedHeight = min(geom.height(), wsize.height())
if cappedWidth > wsize.width() or cappedHeight > wsize.height():
if cappedWidth < wsize.width() or cappedHeight < wsize.height():
widget.resize(QSize(cappedWidth, cappedHeight))
# ensure widget is inside top left

View file

@ -443,9 +443,20 @@ impl Collection {
.storage
.get_deck(card.deck_id)?
.or_not_found(card.deck_id)?;
let config = self.home_deck_config(deck.config_id(), card.original_deck_id)?;
let home_deck = if card.original_deck_id.0 == 0 {
&deck
} else {
&self
.storage
.get_deck(card.original_deck_id)?
.or_not_found(card.original_deck_id)?
};
let config = self
.storage
.get_deck_config(home_deck.config_id().or_invalid("home deck is filtered")?)?
.unwrap_or_default();
let desired_retention = deck.effective_desired_retention(&config);
let desired_retention = home_deck.effective_desired_retention(&config);
let fsrs_enabled = self.get_config_bool(BoolKey::Fsrs);
let fsrs_next_states = if fsrs_enabled {
let params = config.fsrs_params();