mirror of
https://github.com/ankitects/anki.git
synced 2025-12-07 03:47:13 -05:00
Fix FindDuplicates dialog size exceeding screen bounds (#4426)
This commit is contained in:
parent
5d4b00a11d
commit
c2fddcaf42
3 changed files with 5 additions and 1 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>
|
||||||
|
|
||||||
********************
|
********************
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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>
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue