mirror of
https://github.com/ankitects/anki.git
synced 2026-01-09 03:53:55 -05:00
Merge branch 'overlapping-ranges-fix' of github.com:JMannervik/anki into overlapping-ranges-fix
This commit is contained in:
commit
14b88a6f2c
5 changed files with 14 additions and 4 deletions
|
|
@ -254,6 +254,7 @@ nav1s <nav1s@proton.me>
|
||||||
Ranjit Odedra <ranjitodedra.dev@gmail.com>
|
Ranjit Odedra <ranjitodedra.dev@gmail.com>
|
||||||
Eltaurus <https://github.com/Eltaurus-Lt>
|
Eltaurus <https://github.com/Eltaurus-Lt>
|
||||||
jariji
|
jariji
|
||||||
|
Francisco Esteva <fr.esteva@duocuc.cl>
|
||||||
Junia Mannervik <junia.mannervik@gmail.com>
|
Junia Mannervik <junia.mannervik@gmail.com>
|
||||||
|
|
||||||
********************
|
********************
|
||||||
|
|
|
||||||
|
|
@ -47,6 +47,9 @@
|
||||||
<property name="insertPolicy">
|
<property name="insertPolicy">
|
||||||
<enum>QComboBox::NoInsert</enum>
|
<enum>QComboBox::NoInsert</enum>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="sizeAdjustPolicy">
|
||||||
|
<enum>QComboBox::SizeAdjustPolicy::AdjustToMinimumContentsLengthWithIcon</enum>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
|
|
|
||||||
|
|
@ -94,8 +94,15 @@ class TTSPlayer:
|
||||||
|
|
||||||
rank -= 1
|
rank -= 1
|
||||||
|
|
||||||
# if no preferred voices match, we fall back on language
|
# if no requested voices match, use a preferred fallback voice
|
||||||
# with a rank of -100
|
# (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:
|
for avail in avail_voices:
|
||||||
if avail.lang == tag.lang:
|
if avail.lang == tag.lang:
|
||||||
return TTSVoiceMatch(voice=avail, rank=-100)
|
return TTSVoiceMatch(voice=avail, rank=-100)
|
||||||
|
|
|
||||||
|
|
@ -809,7 +809,7 @@ def ensureWidgetInScreenBoundaries(widget: QWidget) -> None:
|
||||||
wsize = widget.size()
|
wsize = widget.size()
|
||||||
cappedWidth = min(geom.width(), wsize.width())
|
cappedWidth = min(geom.width(), wsize.width())
|
||||||
cappedHeight = min(geom.height(), wsize.height())
|
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))
|
widget.resize(QSize(cappedWidth, cappedHeight))
|
||||||
|
|
||||||
# ensure widget is inside top left
|
# ensure widget is inside top left
|
||||||
|
|
|
||||||
|
|
@ -112,7 +112,6 @@ export function renderReviews(
|
||||||
|
|
||||||
const x = scaleLinear().domain([xMin!, xMax]);
|
const x = scaleLinear().domain([xMin!, xMax]);
|
||||||
|
|
||||||
|
|
||||||
const sourceMap = showTime ? sourceData.reviewTime : sourceData.reviewCount;
|
const sourceMap = showTime ? sourceData.reviewTime : sourceData.reviewCount;
|
||||||
const bins = bin()
|
const bins = bin()
|
||||||
.value((m) => {
|
.value((m) => {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue